src/Biz/File/Service/Impl/CloudFileImplementorImpl.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Biz\File\Service\Impl;
use AppBundle\Common\CloudFileStatusToolkit;
use Biz\BaseService;
use Biz\CloudPlatform\Client\AbstractCloudAPI;
use Biz\Common\CommonException;
use Biz\File\Dao\UploadFileDao;
use Biz\File\Service\FileImplementor;
use Biz\File\UploadFileException;
use Biz\System\Service\SettingService;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use AppBundle\Common\ArrayToolkit;
use AppBundle\Common\FileToolkit;
use Biz\CloudPlatform\CloudAPIFactory;
class CloudFileImplementorImpl extends BaseService implements FileImplementor
{
private $cloudApis = array();
public function moveFile($targetType, $targetId, UploadedFile $originalFile = null, $data = array())
{
}
public function getFile($file)
{
$file['convertParams'] = $this->decodeMetas($file['convertParams']);
$file['metas'] = $this->decodeMetas($file['metas']);
$file['metas2'] = $this->decodeMetas($file['metas2']);
// $file['path'] = $this->getCloudClient()->getFileUrl($file['hashId'],$file['targetId'],$file['targetType']);
return $file;
}
public function getFullFile($file)
{
$cloudFile = $this->createApi('leaf', 'v1')->get("/resources/{$file['globalId']}", array('canNoSdInMetas' => 1));
return $this->mergeCloudFile($file, $cloudFile);
}
public function getFileByGlobalId($globalId)
{
$cloudFile = $this->createApi('root', 'v1')->get('/resources/'.$globalId);
$localFile = $this->getUploadFileDao()->getByGlobalId($globalId);
return $this->mergeCloudFile($localFile, $cloudFile);
}
/**
* @todo 暂时未使用,使用需要重构
*
* @param $targetType
* @param $targetId
* @param array $fileInfo
* @param UploadedFile|null $originalFile
*
* @return array
*
* @throws CommonException
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。