Documentation

CallableWaiter extends AbstractWaiter
in package

Callable wait implementation

Table of Contents

Properties

$attempts  : mixed
$callable  : callable
$config  : mixed
$context  : array<string|int, mixed>
$eventDispatcher  : EventDispatcherInterface

Methods

addSubscriber()  : self
Add an event subscriber to the dispatcher
dispatch()  : Event
Helper to dispatch Guzzle events and set the event name on the event
doWait()  : bool
Method to implement in subclasses
getAllEvents()  : array<string|int, mixed>
Get a list of all of the events emitted from the class
getEventDispatcher()  : EventDispatcherInterface
Get the EventDispatcher of the request
getInterval()  : int
Get the amount of time in seconds to delay between attempts
getMaxAttempts()  : int
The max attempts allowed by the waiter
setCallable()  : self
Set the callable function to call in each wait attempt
setConfig()  : self
Set config options associated with the waiter
setContext()  : self
Set additional context for the callable function. This data will be passed into the callable function as the second argument
setEventDispatcher()  : self
Set the EventDispatcher of the request
setInterval()  : self
Set the amount of time to interval between attempts
setMaxAttempts()  : self
Set the maximum number of attempts to make when waiting
wait()  : mixed
Begin the waiting loop

Properties

$context

protected array<string|int, mixed> $context = array()

Additional context for the callable function

Methods

dispatch()

Helper to dispatch Guzzle events and set the event name on the event

public dispatch(mixed $eventName[, array<string|int, mixed> $context = array() ]) : Event
Parameters
$eventName : mixed

Name of the event to dispatch

$context : array<string|int, mixed> = array()

Context of the event

Return values
Event

Returns the created event object

doWait()

Method to implement in subclasses

public doWait() : bool
Return values
bool

Return true when successful, false on failure

getAllEvents()

Get a list of all of the events emitted from the class

public static getAllEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>

getInterval()

Get the amount of time in seconds to delay between attempts

public getInterval() : int
Return values
int

getMaxAttempts()

The max attempts allowed by the waiter

public getMaxAttempts() : int
Return values
int

setCallable()

Set the callable function to call in each wait attempt

public setCallable(callable $callable) : self
Parameters
$callable : callable

Callable function

Tags
throws
InvalidArgumentException

when the method is not callable

Return values
self

setConfig()

Set config options associated with the waiter

public setConfig(array<string|int, mixed> $config) : self
Parameters
$config : array<string|int, mixed>

Options to set

Return values
self

setContext()

Set additional context for the callable function. This data will be passed into the callable function as the second argument

public setContext(array<string|int, mixed> $context) : self
Parameters
$context : array<string|int, mixed>

Additional context

Return values
self

setInterval()

Set the amount of time to interval between attempts

public setInterval(mixed $interval) : self
Parameters
$interval : mixed

Interval in seconds

Return values
self

setMaxAttempts()

Set the maximum number of attempts to make when waiting

public setMaxAttempts(mixed $maxAttempts) : self
Parameters
$maxAttempts : mixed

Max number of attempts

Return values
self

        
On this page

Search results