芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/mctv/lib/Service/ModuleService.php
. */ namespace Xibo\Service; use Stash\Interfaces\PoolInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Xibo\Helper\SanitizerService; use Xibo\Storage\StorageServiceInterface; use Xibo\Support\Exception\NotFoundException; /** * Class ModuleService * @package Xibo\Service */ class ModuleService implements ModuleServiceInterface { /** * @var StorageServiceInterface */ private $store; /** * @var PoolInterface */ private $pool; /** * @var LogServiceInterface */ private $logService; /** * @var ConfigServiceInterface */ private $configService; /** * @var SanitizerService */ private $sanitizerService; /** @var EventDispatcherInterface */ private $dispatcher; /** * @inheritdoc */ public function __construct($store, $pool, $log, $config, $sanitizer, $dispatcher) { $this->store = $store; $this->pool = $pool; $this->logService = $log; $this->configService = $config; $this->sanitizerService = $sanitizer; $this->dispatcher = $dispatcher; } /** * @inheritdoc */ public function get($module, $moduleFactory, $mediaFactory, $dataSetFactory, $dataSetColumnFactory, $transitionFactory, $displayFactory, $commandFactory, $scheduleFactory, $permissionFactory, $userGroupFactory, $playlistFactory, $view, $container) { $object = $this->getByClass($module->class, $moduleFactory, $mediaFactory, $dataSetFactory, $dataSetColumnFactory, $transitionFactory, $displayFactory, $commandFactory, $scheduleFactory, $permissionFactory, $userGroupFactory, $playlistFactory, $view, $container); $object->setModule($module); return $object; } /** * @inheritdoc */ public function getByClass($className, $moduleFactory, $mediaFactory, $dataSetFactory, $dataSetColumnFactory, $transitionFactory, $displayFactory, $commandFactory, $scheduleFactory, $permissionFactory, $userGroupFactory, $playlistFactory, $view, $container) { if (!\class_exists($className)) { throw new NotFoundException(__('Class %s not found', $className)); } /* @var \Xibo\Widget\ModuleWidget $object */ $object = new $className( $this->store, $this->pool, $this->logService, $this->configService, $this->sanitizerService, $this->dispatcher, $moduleFactory, $mediaFactory, $dataSetFactory, $dataSetColumnFactory, $transitionFactory, $displayFactory, $commandFactory, $scheduleFactory, $permissionFactory, $userGroupFactory, $playlistFactory, $view, $container ); return $object; } }