当前位置: 首页>>代码示例>>PHP>>正文


PHP FirePHP::addSettings方法代码示例

本文整理汇总了PHP中FirePHP::addSettings方法的典型用法代码示例。如果您正苦于以下问题:PHP FirePHP::addSettings方法的具体用法?PHP FirePHP::addSettings怎么用?PHP FirePHP::addSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FirePHP的用法示例。


在下文中一共展示了FirePHP::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);
     }
 }
开发者ID:xamiro-dev,项目名称:xamiro,代码行数:37,代码来源:Console.php


注:本文中的FirePHP::addSettings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。