示例#1
0
文件: Helper.php 项目: venne/tester
 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);
 }
示例#2
0
 /**
  * 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);
 }