/**
  * Handles object conversion to debug string.
  *
  * @param string $var Object to convert
  * @access protected
  */
 function _output($level, $error, $code, $helpCode, $description, $file, $line, $kontext)
 {
     $files = $this->trace(array('start' => 2, 'format' => 'points'));
     $listing = $this->excerpt($files[0]['file'], $files[0]['line'] - 1, 1);
     $trace = $this->trace(array('start' => 2, 'depth' => '20'));
     $context = array();
     foreach ((array) $kontext as $var => $value) {
         $context[] = "\${$var}\t=\t" . $this->exportVar($value, 1);
     }
     if ($this->_outputFormat == 'fb') {
         $this->_fireError($error, $code, $description, $file, $line, $trace, $context);
     } else {
         echo parent::_output($level, $error, $code, $helpCode, $description, $file, $line, $kontext);
     }
 }
Пример #2
0
 /**
  * Handles object conversion to debug string.
  *
  * @param string $var Object to convert
  * @access protected
  */
 function _output($data = array())
 {
     extract($data);
     if (is_array($level)) {
         $error = $level['error'];
         $code = $level['code'];
         if (isset($level['helpID'])) {
             $helpID = $level['helpID'];
         } else {
             $helpID = '';
         }
         $description = $level['description'];
         $file = $level['file'];
         $line = $level['line'];
         $context = $level['context'];
         $level = $level['level'];
     }
     $files = $this->trace(array('start' => 2, 'format' => 'points'));
     $listing = $this->excerpt($files[0]['file'], $files[0]['line'] - 1, 1);
     $trace = $this->trace(array('start' => 2, 'depth' => '20'));
     if ($this->_outputFormat == 'fb') {
         $kontext = array();
         foreach ((array) $context as $var => $value) {
             $kontext[] = "\${$var}\t=\t" . $this->exportVar($value, 1);
         }
         $this->_fireError($error, $code, $description, $file, $line, $trace, $kontext);
     } else {
         $data = compact('level', 'error', 'code', 'helpID', 'description', 'file', 'path', 'line', 'context');
         echo parent::_output($data);
     }
 }