本文整理汇总了PHP中ChromePhp::group方法的典型用法代码示例。如果您正苦于以下问题:PHP ChromePhp::group方法的具体用法?PHP ChromePhp::group怎么用?PHP ChromePhp::group使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChromePhp
的用法示例。
在下文中一共展示了ChromePhp::group方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: log
/**
* log to console directly with this method passing only the first required parameter and to change
* the log type the third parameter according to allowed log types. pass a lable for second parameter
* to describe the message send to console.
*
* @error 10908
* @param null|mixed $mixed expects the message of any type to send to console
* @param null|string $label expects the optional label to describe the first parameter
* @param string $type expects the log type - see log type array
* @param array $options expects optional parameters
* @return void
* @throws Xapp_Error
*/
public function log($mixed = null, $label = null, $type = 'info', array $options = array())
{
$type = strtolower((string) $type);
if (array_key_exists($type, self::$_typeMap)) {
if ($type === 'ini') {
$this->ini($mixed, $label, $options);
}
if ($label !== null) {
$label = trim(trim($label), ':') . ':';
}
switch ($this->_driver) {
case 'chromephp':
switch ($type) {
case $type === 'ungroup' || $mixed === null:
$this->console->groupEnd();
break;
case 'group':
$this->console->group($mixed);
break;
case 'trace':
$this->console->log((string) $label, $mixed, 'info');
break;
default:
$this->console->log((string) $label, $mixed, self::$_typeMap[$type]);
}
break;
case 'firephp':
switch ($type) {
case $type === 'ungroup' || $mixed === null:
$this->console->groupEnd();
break;
case 'group':
$this->console->group($mixed, $options);
break;
case 'trace':
$this->console->trace($label);
break;
default:
$this->console->{$type}($mixed, (string) $label, $options);
}
break;
}
} else {
throw new Xapp_Error(xapp_sprintf(_("xapp console log type: %s not supported"), $type), 1090801);
}
}
示例2: outputBrowser
static function outputBrowser($type, $data)
{
// Browser Extensions
if (CONSOLE_FIREPHP) {
try {
//if (!in_array($type, array("log", "info", "warn", "error"))) { $type = "log"; }
//FirePHP::{$type}($data);
switch ($type) {
case "log":
FirePHP::log($data);
break;
case "info":
FirePHP::info($data);
break;
case "warn":
FirePHP::warn($data);
break;
case "error":
FirePHP::error($data);
break;
default:
FirePHP::log($data);
break;
}
} catch (Exception $e) {
}
}
if (CONSOLE_CHROMELOGGER) {
try {
//if (!in_array($type, array("log", "info", "warn", "error", "group", , "groupCollapsed", "groupEnd"))) { $type = "log"; }
//ChromePhp::{$type}($data);
switch ($type) {
case "log":
ChromePhp::log($data);
break;
case "info":
ChromePhp::info($data);
break;
case "warn":
ChromePhp::warn($data);
break;
case "error":
ChromePhp::error($data);
break;
case "group":
ChromePhp::group($data);
break;
case "groupCollapsed":
ChromePhp::groupCollapsed($data);
break;
case "groupEnd":
ChromePhp::groupEnd($data);
break;
default:
ChromePhp::log($data);
break;
}
} catch (Exception $e) {
}
}
}