Ejemplo n.º 1
0
 public function tearDown()
 {
     return;
     $this->_db->getConnection()->exec('DROP TABLE foo');
     Channel\HttpHeaders::destroyInstance();
     FirePhp\FirePhp::destroyInstance();
 }
Ejemplo n.º 2
0
 public function tearDown()
 {
     if (extension_loaded('pdo_sqlite')) {
         $this->_db->getConnection()->exec('DROP TABLE foo');
     }
     Channel\HttpHeaders::destroyInstance();
     FirePhp\FirePhp::destroyInstance();
 }
Ejemplo n.º 3
0
 /**
  * Enable or disable the profiler.  If $enable is false, the profiler
  * is disabled and will not log any queries sent to it.
  *
  * @param  boolean $enable
  * @return \Zend\Db\Profiler Provides a fluent interface
  */
 public function setEnabled($enable)
 {
     parent::setEnabled($enable);
     if ($this->getEnabled()) {
         if (!$this->_message) {
             $this->_message = new \Zend\Wildfire\Plugin\FirePhp\TableMessage($this->_label);
             $this->_message->setBuffered(true);
             $this->_message->setHeader(array('Time', 'Event', 'Parameters'));
             $this->_message->setDestroy(true);
             $this->_message->setOption('includeLineNumbers', false);
             \Zend\Wildfire\Plugin\FirePhp\FirePhp::getInstance()->send($this->_message);
         }
     } else {
         if ($this->_message) {
             $this->_message->setDestroy(true);
             $this->_message = null;
         }
     }
     return $this;
 }
Ejemplo n.º 4
0
 /**
  * Log a message to the Firebug Console.
  *
  * @param array $event The event data
  * @return void
  */
 protected function _write($event)
 {
     if (!$this->getEnabled()) {
         return;
     }
     if (array_key_exists($event['priority'], $this->_priorityStyles)) {
         $type = $this->_priorityStyles[$event['priority']];
     } else {
         $type = $this->_defaultPriorityStyle;
     }
     $message = $this->_formatter->format($event);
     $label = isset($event['firebugLabel']) ? $event['firebugLabel'] : null;
     FirePhp\FirePhp::getInstance()->send($message, $label, $type, array('traceOffset' => 6));
 }