public function __construct(PuliService $puli = null) { $this->service = new ServiceContainer($puli); $this->service->setKernel($this); $this->dispatcher = $this->service->getDispatcher(); $this->registerListeners(); }
public function __construct(ServiceContainer $service, $locale) { parent::__construct($locale); $this->service = $service; $dispatcher = $service->getDispatcher(); $dispatcher->addSubscriber($this); $this->domainStack = new Stack(); }
public function __construct(ServiceContainer $service) { $this->service = $service; $this->loadedModules = new Map(); $this->activatedModules = new Map(); $this->installedModules = new Map(); $dispatcher = $service->getDispatcher(); $dispatcher->addSubscriber($this); // load modules $modules = ModuleQuery::create()->find(); foreach ($modules as $module) { $this->installedModules->set($module->getName(), $module); if ($module->getActivatedVersion() !== null) { $this->activatedModules->set($module->getName(), $module); } } }
public function __construct(ServiceContainer $service) { $this->service = $service; $this->dispatcher = $this->service->getDispatcher(); }