PHP 클래스 Habari\Error

상속: extends Exception
파일 보기 프로젝트 열기: habari/system

보호된 프로퍼티들

프로퍼티 타입 설명
$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