Home - php-fast-forward/defer GitHub Wiki
This is an automatically generated documentation for Fast Forward Deferred Callbacks utility classes.
Namespaces
\FastForward\Defer
Classes
| Class |
Description |
Defer |
This class MUST be used to manage deferred callbacks that SHALL be executed at the end of a scope. |
Interfaces
| Interface |
Description |
DeferInterface |
This interface MUST be implemented by any class that manages deferred callbacks. |
ErrorReporterInterface |
This interface MUST be implemented by any class that reports exceptions from deferred callbacks. |
Functions
| Function |
Description |
defer() |
Creates a new Defer instance, optionally registering a callback immediately. |
using() |
Executes a callback within a controlled scope, ensuring resources are released at the end. |
scope() |
Executes a callback within a deferred scope, ensuring all registered callbacks are executed at the end. |
\FastForward\Defer\ErrorReporter
Classes
| Class |
Description |
CompositeErrorReporter |
Aggregates multiple error reporters and delegates error reporting to all of them. |
ErrorLogErrorReporter |
This error reporter implementation MUST log all reported exceptions using error_log. |
NullErrorReporter |
This error reporter implementation MUST ignore all reported exceptions. |
PsrEventDispatcherErrorReporter |
This error reporter implementation MUST dispatch all reported exceptions as events using a PSR-14 compatible event dispatcher. |
PsrLoggerErrorReporter |
This error reporter implementation MUST log all reported exceptions using a PSR-3 compatible logger. |
\FastForward\Defer\EventDispatcher\Event
Classes
\FastForward\Defer\EventDispatcher\Listener
Classes
| Class |
Description |
LogDeferredCallbackFailure |
Listener that logs failed deferred callback executions using a PSR-3 compatible logger. |
\FastForward\Defer\EventDispatcher\ListenerProvider
Classes
\FastForward\Defer\Middleware
Classes
| Class |
Description |
DeferMiddleware |
This middleware MUST be used to inject and manage a Defer instance in a PSR-15 ServerRequest. |
\FastForward\Defer\Support
Classes
| Class |
Description |
CallbackDescriber |
This utility class MUST be used to generate human-readable descriptions for any PHP callable. |