DeferInterface
This interface MUST be implemented by any class that manages deferred callbacks.
Description
Implementations SHALL provide mechanisms to register, execute, and check the presence of callbacks. All documentation MUST be in English and use RFC 2119 terminology.
Methods
Registers a callback to be executed later.
Registers a callback to be executed later.
Determines if there are no registered callbacks.
Registers a callback to be executed later.
public
__invoke(
callable
$callback,
mixed
...$arguments) : void
Description
This method MUST add the callback to the stack. It MAY be called multiple times.
Parameters
$callback
:
callable
Description
the callback to register
$arguments
:
mixed
Description
Arguments for the callback.
Registers a callback to be executed later.
public
defer(
callable
$callback,
mixed
...$args) : void
Description
This method MUST add the callback to the stack. It MAY be called multiple times.
Parameters
$callback
:
callable
Description
the callback to register
$args
:
mixed
Description
Arguments for the callback.
Determines if there are no registered callbacks.
public
isEmpty() : bool
Description
This method MUST return true if no callbacks are registered; otherwise, it MUST return false.
Return values
Description
true if no callbacks are registered; otherwise, false