Example #1
0
File: Kernel.php Project: havvg/psi
 /**
  * {@inheritdoc}
  */
 public function boot()
 {
     if ($this->booted) {
         return;
     }
     if (!$this->configCache->isFresh()) {
         $this->container = $this->createContainerBuilder();
         $this->container->compile();
         $dumper = new PhpDumper($this->container);
         $cache = $dumper->dump(['namespace' => __NAMESPACE__, 'class' => 'CachedContainer', 'file' => $this->configCache->getPath()]);
         $this->configCache->write($cache, $this->container->getResources());
     }
     require_once $this->configCache->getPath();
     $this->container = new CachedContainer();
     $this->booted = true;
 }