DeferInterface

Interface
extends Countable

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.

Table of Contents

Methods

__invoke()

Registers a callback to be executed later.

 : void
defer()

Registers a callback to be executed later.

 : void
isEmpty()

Determines if there are no registered callbacks.

 : bool
Methods

__invoke()

Public

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.

defer()

Public

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.

isEmpty()

Public

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
bool

Description

true if no callbacks are registered; otherwise, false