Fast Forward Deferred Callbacks utility classes

PsrLoggerErrorReporter
in package
implements ErrorReporterInterface

Read onlyYes
FinalYes

This error reporter implementation MUST log all reported exceptions using a PSR-3 compatible logger.

It SHALL provide a detailed log message including the exception class, message, file, line, callback description, and arguments. This class MUST NOT throw exceptions during reporting.

Table of Contents

Interfaces

ErrorReporterInterface
This interface MUST be implemented by any class that reports exceptions from deferred callbacks.

Properties

$logger  : LoggerInterface

Methods

__construct()  : mixed
Constructs a new PsrLoggerErrorReporter instance.
report()  : void
Reports a throwable using the PSR-3 logger.

Properties

Methods

__construct()

Constructs a new PsrLoggerErrorReporter instance.

public __construct(LoggerInterface $logger) : mixed
Parameters
$logger : LoggerInterface

the PSR-3 logger to use for error reporting

report()

Reports a throwable using the PSR-3 logger.

public report(Throwable $throwable[, callable|null $callback = null ][, array<string|int, mixed> $args = [] ]) : void

This method MUST log the exception details and callback description. It MUST NOT throw exceptions.

Parameters
$throwable : Throwable

the exception or error to report

$callback : callable|null = null

the related callback, if available

$args : array<string|int, mixed> = []

arguments passed to the callback, if any


        
On this page

Search results