/**
  * ConfigLoader constructor.
  * @param KernelInterface $kernelInterface
  */
 public function __construct(KernelInterface $kernelInterface)
 {
     $this->kernel = $kernelInterface;
     $this->configLoader = $kernelInterface->getConfigLoader();
     $this->di = $kernelInterface->getDI();
     $this->config = $kernelInterface->getConfig();
 }
Ejemplo n.º 2
0
 /**
  * @param KernelInterface $kernel
  * @depends testConfigInstanceOfConfig
  */
 public function testEnvironmentName(KernelInterface $kernel)
 {
     $this->assertEquals($this->env, $kernel->getEnvironment());
 }
 public function __construct(KernelInterface $kernelInterface)
 {
     $this->loader = $kernelInterface->getConfigLoader();
     $this->kernelInterface = $kernelInterface;
 }
Ejemplo n.º 4
0
 /**
  * Runs the current application.
  *
  * @param InputInterface $input An Input instance
  * @param OutputInterface $output An Output instance
  *
  * @return int 0 if everything went fine, or an error code
  */
 public function doRun(InputInterface $input, OutputInterface $output)
 {
     $this->kernel->boot();
     $this->setDI($this->kernel->getDI());
     return parent::doRun($input, $output);
 }