debugbar() protected static method

GET the debugbar service Instance
protected static debugbar ( ) : PhalconDebugbar
return Snowair\Debugbar\PhalconDebugbar
示例#1
0
 /**
  * GET the debugbar service Instance
  * @return \Snowair\Debugbar\PhalconDebugbar
  * @throws \DebugBar\DebugBarException
  */
 protected static function debugbar()
 {
     if (!self::$debugbar) {
         $di = Di::getDefault();
         if ($di->has('debugbar')) {
             return self::$debugbar = $di->getShared('debugbar');
         } else {
             return self::$debugbar = new \Snowair\Debugbar\EmptyDebugbar();
         }
     }
     return self::$debugbar;
 }