class Asplode

Implements static convenience methods for use with Asplode.

Methods

static  tuple<ErrorHandlerInterface,FatalErrorHandlerInterface>
install( integer $reservedMemory = 1048576, Isolator $isolator = null)

Installs a new error handler, and a new fatal error handler simultaneously.

installErrorHandler( Isolator $isolator = null)

Installs a new error handler.

installFatalHandler( integer $reservedMemory = 1048576, Isolator $isolator = null)

Installs a new fatal error handler.

static 
assertCompatibleHandler( Isolator $isolator = null)

Asserts that an error handling is configured in a way that is compatible with code expecting error exceptions.

Details

at line 33
static tuple<ErrorHandlerInterface,FatalErrorHandlerInterface> install( integer $reservedMemory = 1048576, Isolator $isolator = null)

Installs a new error handler, and a new fatal error handler simultaneously.

Parameters

integer $reservedMemory The amount of memory to reserve for fatal error handling.
Isolator $isolator The isolator to use.

Return Value

tuple<ErrorHandlerInterface,FatalErrorHandlerInterface> A tuple containing the installed error handler and fatal error handler.

Exceptions

ErrorHandlingConfigurationException If the error reporting level is incorrectly configured.

at line 50
static ErrorHandlerInterface installErrorHandler( Isolator $isolator = null)

Installs a new error handler.

Parameters

Isolator $isolator The isolator to use.

Return Value

ErrorHandlerInterface The installed error handler.

Exceptions

ErrorHandlingConfigurationException If the error reporting level is incorrectly configured.

at line 69
static FatalErrorHandlerInterface installFatalHandler( integer $reservedMemory = 1048576, Isolator $isolator = null)

Installs a new fatal error handler.

This handler will, on shutdown, detect any installed exception handler, and pass an exception representing any fatal errors to said handler.

Parameters

integer $reservedMemory The amount of memory to reserve for fatal error handling.
Isolator $isolator The isolator to use.

Return Value

FatalErrorHandlerInterface The installed fatal error handler.

at line 87
static assertCompatibleHandler( Isolator $isolator = null)

Asserts that an error handling is configured in a way that is compatible with code expecting error exceptions.

Parameters

Isolator $isolator The isolator to use.

Exceptions

ErrorHandlingConfigurationException If error handling is not configured correctly.