示例#1
0
 /**
  * {@inheritdoc}
  */
 public function setKernel(KernelInterface $kernel)
 {
     $this->kernel = $kernel;
     if (null === self::$sharedKernel) {
         self::$sharedKernel = clone $kernel;
         self::$sharedKernel->boot();
     }
 }
示例#2
0
 /**
  * @return RouterInterface
  */
 protected function getRouter()
 {
     if (null === self::$router) {
         self::$router = $this->getService('router');
     }
     return self::$router;
 }