/** * @param mixed $configuration * @return TwigRenderer */ public static function factory($configuration = null) { if (is_null($configuration)) { $configuration = __DIR__ . '/nucleus.json'; } return Nucleus::serviceFactory($configuration, 'templateRenderer.twig'); }
/** * @param mixed $configuration * @return ICommandLineService */ public static function factory($configuration = null) { if (is_null($configuration)) { $configuration = __DIR__ . '/nucleus.json'; } return Nucleus::serviceFactory($configuration, ICommandLineService::NUCLEUS_SERVICE_NAME); }
/** * * @return SingletonApplicationKernel * @throws \RuntimeException */ static function createInstance() { if (!is_null(self::$instance)) { throw new \RuntimeException('Nucleus application kernel instance already created'); } $application = self::$instance = new static(); $application->preCreation(); $dnaConfiguration = self::$instance->getDnaConfiguration(); if (!$dnaConfiguration instanceof DnaConfiguration) { throw new UnexpectedValueException("The return value for [getDnaConfiguration] should be a instance of [Nucleus\\Framework\\DnaConfiguration]"); } $application->nucleus = Nucleus::factory($dnaConfiguration); $application->postCreation(); return $application; }
/** * @param mixed $configuration * @return Manager */ public static function factory($configuration = null) { if (is_null($configuration)) { $configuration = __DIR__ . '/nucleus.json'; } return Nucleus::serviceFactory($configuration, 'assetManager'); }
protected function initializeContext($file) { $this->serviceContainer = Nucleus::factory(__DIR__ . '/fixtures/' . $file)->getServiceContainer(); $this->migrator = $this->serviceContainer->getServiceByName('migrator'); }
/** * @param mixed $configuration * @return IServiceContainer */ public static function factory(array $configuration = null) { if (is_null($configuration)) { $configuration = __DIR__ . '/nucleus.json'; } return Nucleus::serviceFactory($configuration, "serviceContainer"); }
public function setUp() { $this->nucleus = Nucleus::factory(__DIR__ . '/nucleus.json'); }
public function setUp() { $this->nucleus = Nucleus::factory(__DIR__ . '/fixtures/integrationTest.json'); }
/** * @param mixed $configuration * @return BusinessRuleEngine */ public static function factory($configuration = null) { if (is_null($configuration)) { $configuration = __DIR__ . '/nucleus.json'; } return Nucleus::serviceFactory($configuration, 'businessRuleEngine'); }
public function setUp() { $this->serviceContainer = Nucleus::factory(array('imports' => array(__DIR__ . '/..', __DIR__ . '/../../Framework/Tests/fixtures/phpunit.json')))->getServiceContainer(); $this->accessControlService = $this->serviceContainer->getServiceByName(IAccessControlService::NUCLEUS_SERVICE_NAME); }