本文整理汇总了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;
}
示例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);
}
}
示例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);