/** * @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(); }
/** * @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; }