當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FirePHP::setEnabled方法代碼示例

本文整理匯總了PHP中FirePHP::setEnabled方法的典型用法代碼示例。如果您正苦於以下問題:PHP FirePHP::setEnabled方法的具體用法?PHP FirePHP::setEnabled怎麽用?PHP FirePHP::setEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FirePHP的用法示例。


在下文中一共展示了FirePHP::setEnabled方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getDebugger

 protected static function getDebugger()
 {
     if (is_null(self::$debugger)) {
         header('x-insight: inspect');
         $_SERVER['x-insight'] = 'inspect';
         set_include_path(ONE_LIB_PATH . '/../vendor/firephp/' . PATH_SEPARATOR . get_include_path());
         define('INSIGHT_CONFIG_PATH', self::getConfigFile());
         require_once 'FirePHP/Init.php';
         self::$debugger = FirePHP::getInstance(true);
         self::$debugger->setEnabled(true);
     }
     return self::$debugger;
 }
開發者ID:pdelbar,項目名稱:onethree,代碼行數:13,代碼來源:debug.php

示例2: __construct

 /**
  * Create a new XmppPrebind Object with the required params
  *
  * @param string $jabberHost Jabber Server Host
  * @param string $boshUri    Full URI to the http-bind
  * @param string $resource   Resource identifier
  * @param bool   $useSsl     Use SSL (not working yet, TODO)
  * @param bool   $debug      Enable debug
  */
 public function __construct($jabberHost, $boshUri, $resource, $useSsl = false, $debug = false)
 {
     $this->jabberHost = $jabberHost;
     $this->boshUri = $boshUri;
     $this->resource = $resource;
     $this->useSsl = $useSsl;
     $this->debug = $debug;
     if ($this->debug === true) {
         $this->firePhp = FirePHP::getInstance(true);
         $this->firePhp->setEnabled(true);
     }
     /* TODO: Not working
     		 if (function_exists('gzinflate')) {
     			$this->useGzip = true;
     		}*/
     /*
      * The client MUST generate a large, random, positive integer for the initial 'rid' (see Security Considerations)
      * and then increment that value by one for each subsequent request. The client MUST take care to choose an
      * initial 'rid' that will never be incremented above 9007199254740991 [21] within the session.
      * In practice, a session would have to be extraordinarily long (or involve the exchange of an extraordinary
      * number of packets) to exceed the defined limit.
      *
      * @link http://xmpp.org/extensions/xep-0124.html#rids
      */
     if (function_exists('mt_rand')) {
         $this->rid = mt_rand(1000000000, 10000000000);
     } else {
         $this->rid = rand(1000000000, 10000000000);
     }
 }
開發者ID:specktator,項目名稱:conversejs-prebind-php,代碼行數:39,代碼來源:XmppPrebind.php

示例3: function

| Include FirePHP class as FireAnbu dependency.
|
*/
Autoloader::map(array('FirePHP' => Bundle::path('fireanbu') . 'vendors' . DS . 'FirePHPCore' . DS . 'FirePHP.class' . EXT));
/*
|--------------------------------------------------------------------------
| FireAnbu IoC
|--------------------------------------------------------------------------
|
| Register FirePHP singleton using IoC, in case you need to overwrite the 
| implementation in your application.
|
*/
IoC::singleton('fireanbu', function () {
    $fb = new FirePHP();
    $fb->setEnabled(Config::get('fireanbu::fireanbu.profiler', true));
    return $fb;
});
/*
|--------------------------------------------------------------------------
| Listen to `laravel.log` events
|--------------------------------------------------------------------------
*/
Event::listen('laravel.log', function ($type, $message) {
    $fb = IoC::resolve('fireanbu');
    switch (Str::upper($type)) {
        case FirePHP::INFO:
        case FirePHP::WARN:
        case FirePHP::LOG:
        case FirePHP::ERROR:
            $fb->{$type}($message);
開發者ID:jigeeshup,項目名稱:bootstrap-base-application,代碼行數:31,代碼來源:start.php


注:本文中的FirePHP::setEnabled方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。