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


PHP ChromePhp::getInstance方法代码示例

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


在下文中一共展示了ChromePhp::getInstance方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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

示例2: __construct

 public function __construct()
 {
     if (!class_exists('ChromePhp')) {
         require_once PTE_PLUGINPATH . 'php/chromephp/ChromePhp.php';
     }
     ChromePhp::getInstance()->addSetting(ChromePhp::BACKTRACE_LEVEL, 5);
 }
开发者ID:ilke-zilci,项目名称:newcomers-wp,代码行数:7,代码来源:log.php

示例3: init

 public static function init()
 {
     global $config;
     Logger::$test = $config["test"];
     ChromePhp::getInstance()->addSetting(ChromePhp::BACKTRACE_LEVEL, 2);
 }
开发者ID:jibladakpo,项目名称:helpdesk,代码行数:6,代码来源:Logger.php

示例4: getTypeString

<?php

require_once PTE_PLUGINPATH . 'php/chromephp/ChromePhp.php';
ChromePhp::getInstance()->addSetting(ChromePhp::BACKTRACE_LEVEL, 5);
class PteLogMessage
{
    public static $ERROR = 1;
    public static $WARN = 2;
    public static $INFO = 4;
    public static $DEBUG = 8;
    protected $message;
    protected $type;
    protected $date;
    private function getTypeString()
    {
        switch ($this->type) {
            case self::$ERROR:
                return __("ERROR", PTE_DOMAIN);
                break;
            case self::$WARN:
                return __("WARNING", PTE_DOMAIN);
                break;
            case self::$INFO:
                return __("INFO", PTE_DOMAIN);
                break;
            default:
                return __("DEBUG", PTE_DOMAIN);
        }
    }
    public function __construct($type, $message)
    {
开发者ID:roycocup,项目名称:enclothed,代码行数:31,代码来源:log.php

示例5: __construct

 public function __construct()
 {
     include 'api/chromephp/ChromePhp.php';
     $this->api = ChromePhp::getInstance();
 }
开发者ID:pedro-mendonca,项目名称:wp-staging,代码行数:5,代码来源:WPChromePHP.class.php

示例6: _getInstance

 protected function _getInstance()
 {
     return \ChromePhp::getInstance();
 }
开发者ID:vitre,项目名称:php-console-bundle,代码行数:4,代码来源:Driver.php

示例7: init

 public static function init()
 {
     ChromePhp::getInstance()->addSetting(ChromePhp::BACKTRACE_LEVEL, 2);
 }
开发者ID:nicolasBREYNAERT,项目名称:helpdesk,代码行数:4,代码来源:Logger.php


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