コード例 #1
0
ファイル: debug.class.php プロジェクト: xiaodin1/myqee
 public static function instance()
 {
     if (null === Debug::$instance) {
         Debug::$instance = new Debug();
     }
     return Debug::$instance;
 }
コード例 #2
0
ファイル: Debug.php プロジェクト: chitrakojha/introduceme
 public static function getInstance()
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
コード例 #3
0
ファイル: debug.class.php プロジェクト: kamekun/WrapperPHP
 static function getInstance()
 {
     if (self::$instance == NULL) {
         self::$instance = new Debug();
     }
     return self::$instance;
 }
コード例 #4
0
ファイル: Debug.php プロジェクト: swat30/safeballot
 public static function singleton()
 {
     if (!isset(self::$instance)) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }
コード例 #5
0
ファイル: debug.php プロジェクト: amarojunior/b2stokweb
 public static function singleton()
 {
     if (!isset(self::$instance)) {
         // Você deve informar os dados para conexão com o banco de dados.
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }
コード例 #6
0
 public static function Init($debug_type = "")
 {
     self::$instance = new Debug();
     if (empty($debug_type)) {
         $debug_type = self::$last_debug_type;
     }
     if (stristr($debug_type, "file")) {
         self::$instance->log_file = true;
     } elseif (stristr($debug_type, "screen")) {
         self::$instance->log_screen = true;
     }
     self::$last_debug_type = $debug_type;
 }
コード例 #7
0
ファイル: core.class.php プロジェクト: xiaodin1/myqee
 /**
  * 获取debug对象
  * 可安全用于生产环境,在生产环境下将忽略所有debug信息
  * @return Debug
  */
 public static function debug()
 {
     static $debug = null;
     if (null === $debug) {
         if (!IS_CLI && (IS_DEBUG || false !== strpos($_SERVER["HTTP_USER_AGENT"], 'FirePHP') || isset($_SERVER["HTTP_X_FIREPHP_VERSION"])) && class_exists('Debug', true)) {
             $debug = Debug::instance();
         } else {
             $debug = new __NoDebug();
         }
     }
     return $debug;
 }
コード例 #8
0
  function accumulatorStop($key)
  {
    if (!Debug :: isDebugEnabled())
      return;

    $debug =& Debug :: instance();

    $stop_time = $debug->_timeToFloat(microtime());
    if (! array_key_exists($key, $debug->time_accumulator_list))
    {
      Debug :: writeWarning('Accumulator $key does not exists, run Debug :: accumulator_start first', 'Debug :: accumulator_stop');
      return;
    }
    $accumulator = &$debug->time_accumulator_list[$key];
    $diffTime = $stop_time - $accumulator['temp_time'];
    $accumulator['time'] = $accumulator['time'] + $diffTime;
    ++$accumulator['count'];
  }
コード例 #9
0
ファイル: debug53.php プロジェクト: Ben749/racetrack
 public static function i()
 {
     //singleton
     if (!self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
コード例 #10
0
ファイル: debug.lib.php プロジェクト: tedicela/phpdebuglib
 private static function GI()
 {
     if (self::$instance === null) {
         self::$instance = new static();
     }
     return self::$instance;
 }
コード例 #11
0
ファイル: core.class.php プロジェクト: google2013/myqee
 /**
  * 返回DEBUG对象
  *
  * @return \Debug
  */
 public static function debug()
 {
     static $debug = null;
     if (null === $debug) {
         if (!\IS_CLI && \IS_DEBUG && false !== \strpos($_SERVER["HTTP_USER_AGENT"], 'FirePHP') && \class_exists('\\Debug', true)) {
             $debug = \Debug::instance();
         } else {
             $debug = new _NoDebug();
         }
     }
     return $debug;
 }
コード例 #12
0
ファイル: Core.class.php プロジェクト: google2013/myqeecms
 /**
  * 获取debug对象
  * 可安全用于生产环境,在生产环境下将忽略所有debug信息
  * @return Debug
  */
 public static function debug()
 {
     static $debug = null;
     if (null === $debug) {
         if (!IS_CLI && IS_DEBUG && class_exists('Debug', true)) {
             $debug = Debug::instance();
         } else {
             $debug = new MyQEE_Core_NoDebug();
         }
     }
     return $debug;
 }
コード例 #13
0
  static public function instance()
  {
    if (!self :: $instance)
    {
      if(class_exists('DebugMock'))
        self :: $instance = new DebugMock();
      else
        self :: $instance = new Debug();
    }

    return self :: $instance;
  }
コード例 #14
0
ファイル: Hotaru.php プロジェクト: hotarucms/hotarucms
 public function debugNav()
 {
     $admin = Debug::instance();
     $admin->debugNav($this);
 }