protected function refreshContainer() { $container = $this->getContainer(); /** @var Session $session */ if (($session = $container->getByType('Nette\\Http\\Session')) && $session->isStarted()) { $session->close(); } $this->container = new $container(); $this->container->initialize(); }
public function reloadContainer() { $this->presenterFactory = NULL; $container = $this->getContainer(); $configurator = $this->getConfigurator(); $class = $container->parameters['container']['class'] . '_test_' . $this->containerCounter++; \Nette\Utils\LimitedScope::evaluate($configurator->buildContainer($dependencies, $class)); $this->container = new $class(); $this->container->initialize(); $this->container->addService('configurator', $configurator); }
/** * Reload system container. */ protected function reloadSystemContainer() { /** @var $configurator Configurator */ $configurator = $this->context->configurator; $class = $this->context->parameters['container']['class'] . $this->_systemContainer++; LimitedScope::evaluate($configurator->buildContainer($dependencies, $class)); /** @var context Container */ $this->context = new $class(); $this->context->parameters = (include $this->configDir . '/settings.php') + $this->context->parameters; $this->context->initialize(); $this->context->addService("configurator", $configurator); }