本文整理汇总了PHP中ChromePhp::addSettings方法的典型用法代码示例。如果您正苦于以下问题:PHP ChromePhp::addSettings方法的具体用法?PHP ChromePhp::addSettings怎么用?PHP ChromePhp::addSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChromePhp
的用法示例。
在下文中一共展示了ChromePhp::addSettings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* class constructor will include the external console class, initialize it and store
* its instance as $console property. the class can not be instantiated other
* then using singleton method create. the loaded console class will be init and map
* with its log types to this classed log types.
*
* @error 10901
* @param string $driver expects the driver string to load
* @param array $options expects an driver dependent option array
* @throws Xapp_Error
*/
protected function __construct($driver, array $options = array())
{
$this->_driver = strtolower(trim($driver));
switch ($this->_driver) {
case 'firephp':
xapp_import('firephp.firephp-core.*');
if (sizeof(ob_list_handlers()) === 0) {
ob_start();
}
$this->console = FirePHP::init();
$this->console->setOptions($options);
self::$_typeMap = array_merge(self::$_typeMap, array('log' => FirePHP::LOG, 'warn' => FirePHP::WARN, 'info' => FirePHP::INFO, 'error' => FirePHP::ERROR, 'dump' => FirePHP::DUMP, 'trace' => FirePHP::TRACE, 'group' => FirePHP::GROUP_START, 'ungroup' => FirePHP::GROUP_END));
break;
case 'chromephp':
xapp_import('xapp.Ext.ChromePhp');
$this->console = ChromePhp::getInstance();
if (!isset($options[ChromePhp::BACKTRACE_LEVEL])) {
$options[ChromePhp::BACKTRACE_LEVEL] = 2;
}
$this->console->addSettings($options);
self::$_typeMap = array_merge(self::$_typeMap, array('log' => ChromePhp::LOG, 'warn' => ChromePhp::WARN, 'info' => ChromePhp::INFO, 'error' => ChromePhp::ERROR, 'dump' => ChromePhp::INFO, 'trace' => ChromePhp::INFO, 'group' => ChromePhp::GROUP, 'ungroup' => ChromePhp::GROUP_END));
break;
default:
throw new Xapp_Error(xapp_sprintf(_("xapp console driver: %s not supported"), $driver), 1090101);
}
}