src/Biz/MaterialLib/Service/Impl/MaterialLibServiceImpl.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Biz\MaterialLib\Service\Impl;
use Biz\BaseService;
use Biz\CloudFile\Service\CloudFileService;
use Biz\MaterialLib\Service\MaterialLibService;
use AppBundle\Common\ArrayToolkit;
class MaterialLibServiceImpl extends BaseService implements MaterialLibService
{
public function get($id)
{
return $this->getUploadFileService()->getFullFile($id);
}
public function getByGlobalId($globalId)
{
return $this->getUploadFileService()->getFileByGlobalId($globalId);
}
public function player($globalId, $ssl = false)
{
return $this->getCloudFileService()->player($globalId, $ssl);
}
public function edit($fileId, $fields)
{
$this->getUploadFileService()->update($fileId, $fields);
}
public function delete($id)
{
$result = $this->getUploadFileService()->deleteFile($id);
if ($result) {
return true;
}
return false;
}
public function batchDelete($ids)
{
foreach ($ids as $key => $id) {
$result = $this->delete($id);
}
return array('success' => true);
}
public function batchTagEdit($fileIds, $tagNames)
{
$tagNames = explode(',', $tagNames);
foreach ($fileIds as $key => $fileId) {
foreach ($tagNames as $key => $tagName) {
$tag = $this->getTagService()->getTagByName($tagName);
$result = $this->getUploadFileTagService()->findByFileId($fileId);
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。