PHP Класс Habari\Error

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

Защищенные свойства (Protected)

Свойство Тип Описание
$is_error
$message

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

Метод Описание
__construct ( string $message = 'Generic Habari Error', integer $code, boolean $is_error = false ) Constructor for the Error class
_n ( $singular, $plural, $count )
_t ( $v )
error_handler ( $errno, $errstr, $errfile, $errline, $errcontext ) Used to handle all PHP errors after Error::handle_errors() is called.
exception_handler ( $exception ) Used to handle all uncaught exceptions.
get ( ) function get
handle_errors ( ) function handle_errors
humane_error ( ) : string Get the error text, file, and line number from the backtrace, which is more accurate
is_error ( $obj ) function is_error
out ( ) function out
raise ( $error_message, $severity = E_USER_ERROR ) function raise
shutdown_handler ( )

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

Метод Описание
print_backtrace ( array $trace = null ) Print a backtrace in a format that looks reasonable in both rendered HTML and text

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

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

Constructor for the Error class
public __construct ( string $message = 'Generic Habari Error', integer $code, boolean $is_error = false )
$message string Exception to display
$code integer Code of the exception
$is_error boolean true if the exception represents an error handled by the Error class

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

public _n ( $singular, $plural, $count )

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

public _t ( $v )

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

Used to handle all PHP errors after Error::handle_errors() is called.
public static error_handler ( $errno, $errstr, $errfile, $errline, $errcontext )

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

Used to handle all uncaught exceptions.
public static exception_handler ( $exception )

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

Returns the error message in plain text
public get ( )

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

Configures the Error class to handle all errors.
public static handle_errors ( )

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

Get the error text, file, and line number from the backtrace, which is more accurate
public humane_error ( ) : string
Результат string The contructed error string

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

Returns true if the argument is an Error instance
public static is_error ( $obj )

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

Outputs the error message in plain text
public out ( )

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

Convenience method to create and return a new Error object
public static raise ( $error_message, $severity = E_USER_ERROR )

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

public static shutdown_handler ( )

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

$is_error защищенное свойство

protected $is_error

$message защищенное свойство

protected $message