PHP Класс MY_Exceptions, 68kb

Наследование: extends CI_Exceptions
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$php_errors Some nice names for the error types
$shutdown_errors The Shutdown errors to show (all others will be ignored).

Открытые методы

Метод Описание
__construct ( ) : void Construct
debug_path ( string $file ) : string Debug Path
debug_source ( $file, $line_number, $padding = 5 ) : FALSE Debug Source
error_handler ( $code, $error, $file = NULL, $line = NULL ) : boolean Error Handler
exception_handler ( Exception $e ) : boolean Exception Handler
exception_text ( Exception $e ) : string Exception Text
show_error ( $heading, $message, $template = 'error_general', $status_code = 500 ) : string General Error Page
shutdown_handler ( ) : void Shutdown Handler
trace ( array $trace = NULL ) : string Trace

Приватные методы

Метод Описание
is_extension ( string $file ) : boolean Is Extension

Описание методов

__construct() публичный Метод

Sets the error handlers.
public __construct ( ) : void
Результат void

debug_path() публичный статический Метод

This makes nicer looking paths for the error output.
public static debug_path ( string $file ) : string
$file string
Результат string

debug_source() публичный статический Метод

Returns an HTML string, highlighting a specific line of a file, with some number of lines padded above and below.
public static debug_source ( $file, $line_number, $padding = 5 ) : FALSE
Результат FALSE source of file

error_handler() публичный статический Метод

Converts all errors into ErrorExceptions. This handler respects error_reporting settings.
public static error_handler ( $code, $error, $file = NULL, $line = NULL ) : boolean
Результат boolean

exception_handler() публичный статический Метод

Displays the error message, source of the exception, and the stack trace of the error.
public static exception_handler ( Exception $e ) : boolean
$e Exception
Результат boolean

exception_text() публичный статический Метод

Makes a nicer looking, 1 line extension.
public static exception_text ( Exception $e ) : string
$e Exception
Результат string

show_error() публичный Метод

This function takes an error message as input (either as a string or an array) and displays it using the specified template.
public show_error ( $heading, $message, $template = 'error_general', $status_code = 500 ) : string
Результат string

shutdown_handler() публичный статический Метод

Catches errors that are not caught by the error handler, such as E_PARSE.
public static shutdown_handler ( ) : void
Результат void

trace() публичный статический Метод

Returns an array of HTML strings that represent each step in the backtrace.
public static trace ( array $trace = NULL ) : string
$trace array
Результат string

Описание свойств

$php_errors публичное статическое свойство

Some nice names for the error types
public static $php_errors

$shutdown_errors публичное статическое свойство

The Shutdown errors to show (all others will be ignored).
public static $shutdown_errors