コード例 #1
0
ファイル: AppBuilderCommand.php プロジェクト: stopsopa/utils
 /**
  * @return ContainerInterface
  */
 public static function getCont()
 {
     if (!static::$_kernel) {
         global $kernel;
         static::$_kernel = $kernel;
         if ($kernel instanceof AppCache) {
             static::$_kernel = $kernel->getKernel()->getContainer();
         }
     }
     return static::$_kernel->getContainer();
 }
コード例 #2
0
ファイル: AbstractApp.php プロジェクト: stopsopa/utils
 /**
  * @return Kernel
  */
 public static function getKernel($hrow = true)
 {
     if (!static::$_kernel) {
         global $kernel;
         if (!isset($kernel)) {
             if ($hrow) {
                 throw new NoFrameworkException('UtilsBundle nie uzyskał dostępu do komponentów symfony');
             }
             return;
         }
         static::$_kernel = $kernel;
         if ($kernel instanceof AppCache) {
             static::$_kernel = $kernel->getKernel();
         }
     }
     return static::$_kernel;
 }