Symfony\Component\HttpKernel\Kernel::shutdown PHP Méthode

shutdown() public méthode

This method is mainly useful when doing functional testing.
public shutdown ( )
    public function shutdown()
    {
        $this->booted = false;

        foreach ($this->bundles as $bundle) {
            $bundle->shutdown();
            $bundle->setContainer(null);
        }

        $this->container = null;
    }

Usage Example

 /**
  * @Given the following acme_php configuration:
  */
 public function theFollowingAcmePhpConfiguration(PyStringNode $rawConfig)
 {
     $yaml = new Yaml();
     $config = ['acme_php' => array_merge($this->getDefaultConfig(), $yaml->parse($rawConfig->getRaw()))];
     $this->filesystem->dumpFile($this->acmeConfigPath, $yaml->dump($config, 4));
     $this->kernel->shutdown();
     $this->filesystem->remove($this->kernel->getCacheDir());
     $this->kernel->boot();
 }
All Usage Examples Of Symfony\Component\HttpKernel\Kernel::shutdown