class ReportableHandler (View source)

Traits

Properties

protected callable $callback The underlying callback.
protected bool $shouldStop Indicates if reporting should stop after invoking this handler.

Methods

array
closureParameterTypes(Closure $closure)

Get the class names / types of the parameters of the given Closure.

string
firstClosureParameterType(Closure $closure)

Get the class name of the first parameter of the given Closure.

void
__construct(callable $callback)

Create a new reportable handler instance.

bool
__invoke(Throwable $e)

Invoke the handler.

bool
handles(Throwable $e)

Determine if the callback handles the given exception.

$this
stop()

Indicate that report handling should stop after invoking this callback.

Details

protected array closureParameterTypes(Closure $closure)

Get the class names / types of the parameters of the given Closure.

Parameters

Closure $closure

Return Value

array

Exceptions

ReflectionException

protected string firstClosureParameterType(Closure $closure)

Get the class name of the first parameter of the given Closure.

Parameters

Closure $closure

Return Value

string

Exceptions

RuntimeException

void __construct(callable $callback)

Create a new reportable handler instance.

Parameters

callable $callback

Return Value

void

bool __invoke(Throwable $e)

Invoke the handler.

Parameters

Throwable $e

Return Value

bool

bool handles(Throwable $e)

Determine if the callback handles the given exception.

Parameters

Throwable $e

Return Value

bool

$this stop()

Indicate that report handling should stop after invoking this callback.

Return Value

$this