static function showError($heading, $message, $template = 'App.ErrorGeneral', $status_code = 500) { $prop = Loader::getName($template, 'view' . DS . 'error'); _setStatusHeader($status_code); ob_start(); include $prop->path; $buffer = ob_get_contents(); ob_end_clean(); echo $buffer; if (Config::read('App.Base.backtrace_print')) { echo '<pre>'; debug_print_backtrace(); echo '</pre>'; } exit; }
/** * set Status Header Code * * @param number * @param string * @return void */ public function setStatusHeader($code = 200, $text = '') { _setStatusHeader($code, $text); return $this; }