src/Biz/Live/Service/Impl/LiveServiceImpl.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Biz\Live\Service\Impl;
use Biz\Common\CommonException;
use Biz\Live\Service\LiveService;
use Biz\BaseService;
use Biz\User\UserException;
use Biz\System\Service\SettingService;
use Biz\Util\EdusohoLiveClient;
use AppBundle\Common\ArrayToolkit;
class LiveServiceImpl extends BaseService implements LiveService
{
public function createLiveRoom($params)
{
$liveParams = $this->filterCreateParams($params);
try {
$live = $this->getLiveClient()->createLive($liveParams);
} catch (\Exception $e) {
throw $e;
}
if (!empty($live['error'])) {
throw $this->createServiceException($live['error']);
}
return $live;
}
public function updateLiveRoom($liveId, $params)
{
$params['liveId'] = $liveId;
$liveParams = $this->filterUpdateParams($params);
try {
$live = $this->getLiveClient()->updateLive($liveParams);
return $live;
} catch (\Exception $e) {
throw $e;
}
}
public function deleteLiveRoom($liveId)
{
if (empty($liveId)) {
return;
}
try {
return $this->getLiveClient()->deleteLive($liveId);
} catch (\Exception $e) {
throw $e;
}
}
protected function filterCreateParams($params)
{
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。