本文整理汇总了PHP中Zend_Wildfire_Plugin_FirePhp_TableMessage::setDestroy方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Wildfire_Plugin_FirePhp_TableMessage::setDestroy方法的具体用法?PHP Zend_Wildfire_Plugin_FirePhp_TableMessage::setDestroy怎么用?PHP Zend_Wildfire_Plugin_FirePhp_TableMessage::setDestroy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Wildfire_Plugin_FirePhp_TableMessage
的用法示例。
在下文中一共展示了Zend_Wildfire_Plugin_FirePhp_TableMessage::setDestroy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: recordEvent
/**
* Insert a record in the queries table
*
* @param Doctrine_Event $event the event to log
*
* @throws Zend_Db_Profiler_Exception
*
* @return void
*/
public function recordEvent($event)
{
$this->message->setDestroy(false);
// update time counter
$this->totalElapsedTime += $event->getElapsedSecs();
// add a row to the table
$this->message->addRow(array((string) round($event->getElapsedSecs(), 5), $event->getQuery() ? $event->getQuery() : $event->getName(), ($params = $event->getParams()) ? $params : null));
// increment number of queries
$this->totalNumQueries++;
}
示例2: queryEnd
/**
* Intercept the query end and log the profiling data.
*
* @param integer $queryId
* @throws Zend_Db_Profiler_Exception
* @return void
*/
public function queryEnd($queryId)
{
$state = parent::queryEnd($queryId);
if (!$this->getEnabled() || $state == self::IGNORED) {
return;
}
$this->_message->setDestroy(false);
$profile = $this->getQueryProfile($queryId);
$this->_totalElapsedTime += $profile->getElapsedSecs();
$this->_message->addRow(array((string) round($profile->getElapsedSecs(), 5), $profile->getQuery(), ($params = $profile->getQueryParams()) ? $params : null));
$this->updateMessageLabel();
}
示例3: __call
/**
* method overloader
* this method is used for invoking different listeners, for the full
* list of availible listeners, see Doctrine_EventListener
*
* @param string $m the name of the method
* @param array $a method arguments
* @see Doctrine_EventListener
* @return boolean
*/
public function __call($methodName, $arguments)
{
if (!$arguments[0] instanceof Doctrine_Event) {
throw new Doctrine_Connection_Profiler_Exception("Couldn't listen event. Event should be an instance of Doctrine_Event.");
}
if (substr($methodName, 0, 3) == 'pre') {
$arguments[0]->start();
if (!in_array($arguments[0], $this->_events, true)) {
$this->_events[] = $arguments[0];
}
} else {
// we need after-event listeners
$arguments[0]->end();
$this->_message->setDestroy(false);
$this->_totalElapsedTime += $arguments[0]->getElapsedSecs();
$row = array($arguments[0]->getName(), round($arguments[0]->getElapsedSecs(), 5), $arguments[0]->getQuery(), ($params = $arguments[0]->getParams()) ? $params : null);
$this->_message->addRow($row);
$this->updateMessageLabel();
}
}