/** * Sets the error view to be loaded based on the given code. This will stop any views * loaded from being rendered and will only output the error view. * * @param int $code The error code to display */ public static function error($code) { if ($code == ERROR_404) { header('HTTP/1.1 404 Not Found'); } elseif ($code == ERROR_500) { header('HTTP/1.1 500 Internal Server Error'); } self::$_error = self::getPath() . 'errors/' . $code . EXT; }