Beispiel #1
0
 public function testDebugDefaultSapi()
 {
     $sapi = php_sapi_name();
     Zend_Debug::setSapi(null);
     $data = 'string';
     $result = Zend_Debug::Dump($data, null, false);
     $this->assertEquals($sapi, Zend_Debug::getSapi());
 }
Beispiel #2
0
 /**
  * Write a message to the log.
  *
  * @param array $event event data
  * @return void
  */
 protected function _write($event)
 {
     $line = $this->_formatter->format($event);
     if (Zend_Debug::getSapi() == 'cli') {
         if (substr($line, -strlen(PHP_EOL)) != PHP_EOL) {
             $line .= PHP_EOL;
         }
     } else {
         $line = '<pre>' . htmlspecialchars($line) . '</pre>';
     }
     echo $line;
 }