Ejemplo n.º 1
0
 /**
  * Builds and returns error output data for views
  */
 private function _getOutputData($full = true)
 {
     $output = array('status' => $this->_status_code, 'info' => $this->_error_type, 'error' => $this->_error_message, 'file' => $this->_relativePath($this->_error_file), 'line' => $this->_error_line, 'date' => date('r'), 'url' => Server::getUrl(), 'host' => Server::getHost(), 'domain' => Server::getDomain(), 'memory' => Numeric::toSize(memory_get_peak_usage(true)), 'speed' => $this->_getRuntimeSpeed());
     if ($full === true) {
         $output['headers'] = getallheaders();
         if (!empty($this->_error_backtrace)) {
             $output['trace'] = $this->_getBacktrace();
         }
         if (!empty($this->_error_file) && !empty($this->_error_line)) {
             $output['source'] = $this->_getSourceCode($this->_error_file, $this->_error_line);
         }
     }
     return $output;
 }