Beispiel #1
0
 public function syncContainer(KernelInterface $kernel, ContainerModuleLoader $loader, ScopeLoader $scopes)
 {
     if (!$this->needsCheck && array_key_exists('container', $this->cached)) {
         $this->dump['container'] = $this->cached['container'];
         return;
     }
     $ktime = filemtime((new \ReflectionClass(get_class($kernel)))->getFileName());
     $ctime = $loader->getLastModified();
     $chash = $loader->getHash();
     $shash = $scopes->getHash();
     if (!array_key_exists('container', $this->cached)) {
         $this->modified = true;
     } else {
         if (!array_key_exists('ktime', $this->cached['container']) || $ktime !== $this->cached['container']['ktime']) {
             $this->modified = true;
         }
         if (!array_key_exists('ctime', $this->cached['container']) || $ctime !== $this->cached['container']['ctime']) {
             $this->modified = true;
         }
         if (!array_key_exists('chash', $this->cached['container']) || $chash !== $this->cached['container']['chash']) {
             $this->modified = true;
         }
         if (!array_key_exists('shash', $this->cached['container']) || $shash !== $this->cached['container']['shash']) {
             $this->modified = true;
         }
     }
     $this->dump['container'] = ['ktime' => $ktime, 'ctime' => $ctime, 'chash' => $chash, 'shash' => $shash];
 }
Beispiel #2
0
 public function loadContainerModules(ContainerModuleLoader $loader)
 {
     $loader->registerModule(new WebContainerModule());
 }
 public function loadContainerModules(ContainerModuleLoader $loader)
 {
     $loader->registerModule(new ExpressViewContainerModule());
 }