Свойство | Тип | Описание | |
---|---|---|---|
$_checks | Default checks are for code, stack and message. | ||
$_config | Configuration parameters. | ||
$_exceptionHandler | Currently registered exception handler. | ||
$_isRunning | State of error/exception handling. | ||
$_runOptions |
Метод | Описание | |
---|---|---|
apply ( $object, array $conditions, $handler ) | ||
config ( array $config = [] ) : Current | Configure the ErrorHandler. | |
handle ( object | array $info, array $scope = [] ) : boolean | Receives the handled errors and exceptions that have been caught, and processes them in a normalized manner. | |
isRunning ( ) | Returns the state of the ErrorHandler, indicating whether or not custom error/exception handers have been regsitered. | |
matches ( $info, $conditions ) | ||
reset ( ) | Setup basic error handling checks/types, as well as register the error and exception handlers and wipes out all configuration and resets the error handler to its initial state when loaded. Mainly used for testing. | |
run ( array $config = [] ) | Register error and exception handlers. | |
stop ( ) | Unooks ErrorHandler's exception and error handlers, and restores PHP's defaults. May have unexpected results if it is not matched with a prior call to run(), or if other error handlers are set after a call to run(). | |
trace ( array $stack ) : array | Trim down a typical stack trace to class & method calls. |
Метод | Описание | |
---|---|---|
_origin ( array $stack ) : string | Determine frame from the stack trace where the error/exception was first generated. |
public static isRunning ( ) |
public static reset ( ) |
public static run ( array $config = [] ) | ||
$config | array | The configuration with which to start the error handler. Available options include: - `'trapErrors'` _boolean_: Defaults to `false`. If set to `true`, PHP errors will be caught by `ErrorHandler` and handled in-place. Execution will resume in the same context in which the error occurred. - `'convertErrors'` _boolean_: Defaults to `true`, and specifies that all PHP errors should be converted to `ErrorException`s and thrown from the point where the error occurred. The exception will be caught at the first point in the stack trace inside a matching `try`/`catch` block, or that has a matching error handler applied using the `apply()` method. |
public static stop ( ) |
protected static $_checks |
protected static $_exceptionHandler |
protected static $_isRunning |