/**
  * {@inheritDoc}
  */
 public function afterSave(Model $Model, $created, $options = array())
 {
     if ($this->_stopwatchEventSave) {
         $this->_stopwatchEventSave->stop();
     }
     return true;
 }
Ejemplo n.º 2
0
 public function addTimeEventInfo(StopwatchEvent $timeEvent = null)
 {
     if (!$timeEvent) {
         return $this;
     }
     // Contiene i dati sui tempi di esecuzione
     $timeInfoArray = array('exec_time' => new DbgInfoItem('exec_time', $timeEvent ? $timeEvent->getDuration() : 0, DbgInfoItem::TYPE_NUMERIC), 'memory_usage' => new DbgInfoItem('exec_mem', $timeEvent ? $timeEvent->getMemory() : 0, DbgInfoItem::TYPE_MEMSIZE));
     return $this->add('system_info', new DbgInfoArrayItem('System usage info', $timeInfoArray, array('render_type' => 'list')));
 }
 /**
  * {@inheritDoc}
  */
 public function afterRender($viewFile)
 {
     if ($this->_stopwatchEvent) {
         $this->_stopwatchEvent->stop();
     }
 }