本文整理汇总了PHP中Zend_Wildfire_Plugin_FirePhp_TableMessage::setLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Wildfire_Plugin_FirePhp_TableMessage::setLabel方法的具体用法?PHP Zend_Wildfire_Plugin_FirePhp_TableMessage::setLabel怎么用?PHP Zend_Wildfire_Plugin_FirePhp_TableMessage::setLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Wildfire_Plugin_FirePhp_TableMessage
的用法示例。
在下文中一共展示了Zend_Wildfire_Plugin_FirePhp_TableMessage::setLabel方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Create ZFirebug_Controller_Plugin_Debug_Plugin_Html
*
* @param string $tab
* @paran string $panel
* @return void
*/
public function __construct()
{
$this->message = new Zend_Wildfire_Plugin_FirePhp_Message("LOG", "");
$this->message->setBuffered(true);
$this->message->setLabel($this->getTab());
$this->_auth = Zend_Auth::getInstance();
}
示例2: updateMessageLabel
/**
* Update the label of the message holding the profile info.
*
* @return void
*/
protected function updateMessageLabel()
{
if (!$this->_message) {
return;
}
$this->_message->setLabel(str_replace(array('%label%', '%totalCount%', '%totalDuration%'), array($this->_label, $this->getTotalNumQueries(), (string) round($this->_totalElapsedTime, 5)), $this->_label_template));
}
示例3: updateMessageLabel
/**
* Update the label of the message holding the profile info.
*
* @return void
*/
protected function updateMessageLabel()
{
if (!$this->_message) {
return;
}
$this->_message->setLabel($this->_label . ' (' . round($this->_totalElapsedTime, 5) . ' sec)');
}
示例4: _updateMessageLabel
/**
* Update the label of the message holding the profile info.
*
* @return void
*/
protected function _updateMessageLabel()
{
if (!$this->_message) {
return;
}
$search = array('%label%', '%totalCount%', '%totalDuration%');
$replacements = array($this->_label, $this->_queryCount, (string) round($this->_totalElapsedTime, 5));
$label = str_replace($search, $replacements, $this->_label_template);
$this->_message->setLabel($label);
}
示例5: debug
/**
* dump
*
* @return string
*/
public static function debug()
{
$backtrace = debug_backtrace();
// get variable name
$arrLines = file($backtrace[0]["file"]);
$code = $arrLines[$backtrace[0]["line"] - 1];
$arrMatches = array();
// find call to Sys::dump
preg_match('/\\b\\s*Core_Debug::debug\\s*\\(\\s*(.+)\\s*\\);\\s*/i', $code, $arrMatches);
$varName = isset($arrMatches[1]) ? $arrMatches[1] : '???';
$trace = array();
foreach ($backtrace as $rec) {
if (isset($rec['function'])) {
$t['call'] = '';
if (isset($rec['class'])) {
$t['call'] .= $rec['class'] . $rec['type'] . $rec['function'];
} else {
$t['call'] .= $rec['function'];
}
$t['call'] .= '(';
if (sizeof($rec['args'])) {
foreach ($rec['args'] as $arg) {
if (is_object($arg)) {
$t['call'] .= get_class($arg);
} else {
$arg = str_replace("\n", ' ', (string) $arg);
$t['call'] .= '"' . (strlen($arg) <= 30 ? $arg : substr($arg, 0, 25) . '[...]') . '"';
}
$t['call'] .= ', ';
}
$t['call'] = substr($t['call'], 0, -2);
}
$t['call'] .= ")";
}
$t['file'] = @$rec['file'] . ':' . @$rec['line'];
$trace[] = $t;
}
$debug = new Zend_Wildfire_Plugin_FirePhp_TableMessage('Debug');
$debug->setBuffered(true);
$debug->setHeader(array('Value and BackTrace'));
$debug->setOption('includeLineNumbers', false);
foreach (func_get_args() as $var) {
$debug->addRow(array($var));
}
$debug->addRow(array($trace));
$where = basename($backtrace[0]["file"]) . ':' . $backtrace[0]["line"];
$debug->setLabel("Debug: {$varName} ({$where})");
Zend_Wildfire_Plugin_FirePhp::getInstance()->send($debug);
}
示例6: updateLabel
/**
* Sets the label for the FireBug entry
*/
public function updateLabel()
{
$this->_message->setLabel(sprintf('Doctrine Queries (%d @ %f sec)', $this->_queryCount, number_format($this->_totalMS, 5)));
}
示例7: updateMessageLabel
/**
* Update the label of the message holding the profile info.
*
* @return void
*/
protected function updateMessageLabel()
{
$this->message->setLabel(str_replace(array('%label%', '%totalCount%', '%totalDuration%'), array($this->label, $this->totalNumQueries, (string) round($this->totalElapsedTime, 5)), $this->label_template));
}
示例8: updateMessageLabel
/**
* Update the label of the message holding the profile info.
*
* @return void
*/
protected static function updateMessageLabel()
{
self::$_timer->setLabel(sprintf('Timer (%s sec @ %s Kb)', round(self::$_time["section"] - self::$_time["start"], 4), number_format(self::$_memory / 1024, 2, '.', ' ')));
}
示例9: setTab
/**
* Sets tab content
*
* @param string $tab
* @return ZFirebug_Controller_Plugin_Debug_Plugin_Text Provides a fluent interface
*/
public function setTab($tab)
{
$this->_tab = $tab;
$this->message->setLabel($tab);
return $this;
}