/** * * When an exception is thrown during the fetch() process, use this * method to recover from it. * * This default implementation just displays the exception, but extended * classes may override the behavior to return alternative output from * the failed fetch(). * * @param Exception $e The exception thrown during the fetch() process. * * @return string The alternative output from the rescued exception. * */ protected function _exceptionDuringFetch(Exception $e) { $this->_errors[] = $e; $this->_view = 'exception'; $this->_response->setStatusCode(500); // render directly; because this came from the fetch process, we // can't depend on that process to complete successfully. $this->_render(); return $this->_response; }
/** * * Sets the log message in the response headers. * * @param string $data The JSON data for the header. * * @param int $type 3 - normal, 2 - dump * * @return void * */ protected function _setHeader($data, $type = 3) { $utime = explode(' ', microtime()); $utime = substr($utime[1], 7) . substr($utime[0], 2); $this->_response->setHeader("X-FirePHP-Data-{$type}{$utime}", "{$data},"); }
/** * * Sets the log message in the response headers. * * @param string $data The JSON data for the header. * * @param int $type 3 - normal, 2 - dump * * @return void * */ protected function _setHeader($data) { $this->_response->setHeader("X-Wf-1-1-1-" . $this->_count, "{$data}"); $this->_count++; }