ConfigResourceWaiter
extends AbstractResourceWaiter
in package
Resource waiter driven by configuration options
Table of Contents
Properties
- $attempts : mixed
- $client : AwsClientInterface
- $config : mixed
- $eventDispatcher : EventDispatcherInterface
- $waiterConfig : WaiterConfig
Methods
- __construct() : mixed
- addSubscriber() : self
- Add an event subscriber to the dispatcher
- dispatch() : Event
- Helper to dispatch Guzzle events and set the event name on the event
- 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
- getWaiterConfig() : WaiterConfig
- Get the waiter's configuration data
- setClient() : self
- Set the client associated with the waiter
- setConfig() : self
- Set config options associated with the waiter
- 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
- checkErrorAcceptor() : bool|null
- Check if an exception satisfies a success or failure acceptor
- checkPath() : bool
- Check to see if the path of the output key is satisfied by the value
- checkResult() : bool
- Check to see if the response model satisfies a success or failure state
- doWait() : bool
- Method to implement in subclasses
Properties
$attempts
protected
mixed
$attempts
= 0
$client
protected
AwsClientInterface
$client
$config
protected
mixed
$config
= array()
$eventDispatcher
protected
EventDispatcherInterface
$eventDispatcher
$waiterConfig
protected
WaiterConfig
$waiterConfig
Waiter configuration
Methods
__construct()
public
__construct(WaiterConfig $waiterConfig) : mixed
Parameters
- $waiterConfig : WaiterConfig
-
Waiter configuration
addSubscriber()
Add an event subscriber to the dispatcher
public
addSubscriber(EventSubscriberInterface $subscriber) : self
Parameters
- $subscriber : EventSubscriberInterface
-
Event subscriber
Return values
selfdispatch()
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
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>getEventDispatcher()
Get the EventDispatcher of the request
public
getEventDispatcher() : EventDispatcherInterface
Return values
EventDispatcherInterfacegetInterval()
Get the amount of time in seconds to delay between attempts
public
getInterval() : int
Return values
intgetMaxAttempts()
The max attempts allowed by the waiter
public
getMaxAttempts() : int
Return values
intgetWaiterConfig()
Get the waiter's configuration data
public
getWaiterConfig() : WaiterConfig
Return values
WaiterConfigsetClient()
Set the client associated with the waiter
public
setClient(AwsClientInterface $client) : self
Parameters
- $client : AwsClientInterface
-
Client to use with the waiter
Return values
selfsetConfig()
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
selfsetEventDispatcher()
Set the EventDispatcher of the request
public
setEventDispatcher(EventDispatcherInterface $eventDispatcher) : self
Parameters
- $eventDispatcher : EventDispatcherInterface
Return values
selfsetInterval()
Set the amount of time to interval between attempts
public
setInterval(mixed $interval) : self
Parameters
- $interval : mixed
-
Interval in seconds
Return values
selfsetMaxAttempts()
Set the maximum number of attempts to make when waiting
public
setMaxAttempts(mixed $maxAttempts) : self
Parameters
- $maxAttempts : mixed
-
Max number of attempts
Return values
selfwait()
Begin the waiting loop
public
wait() : mixed
checkErrorAcceptor()
Check if an exception satisfies a success or failure acceptor
protected
checkErrorAcceptor(ServiceResponseException $e) : bool|null
Parameters
Return values
bool|null —Returns true for success, false for failure, and null for no transition
checkPath()
Check to see if the path of the output key is satisfied by the value
protected
checkPath(Model $model[, string $key = null ][, string $checkValue = array() ][, bool $all = true ]) : bool
Parameters
- $model : Model
-
Result model
- $key : string = null
-
Key to check
- $checkValue : string = array()
-
Compare the key to the value
- $all : bool = true
-
Set to true to ensure all value match or false to only match one
Return values
boolcheckResult()
Check to see if the response model satisfies a success or failure state
protected
checkResult(Model $result) : bool
Parameters
- $result : Model
-
Result model
Tags
Return values
booldoWait()
Method to implement in subclasses
protected
doWait() : bool
Return values
bool —Return true when successful, false on failure