Promise extends Promise
Table of Contents
Methods
- __construct() : mixed
- fulfill() : void
- Fulfills the promise.
- getHandler() : Handler
- getId() : string
- Returns the promise's id string.
- getRequest() : RequestInterface
- getState() : mixed
- reject() : void
- Rejects the promise.
- then() : mixed
- wait() : mixed
Methods
__construct()
public
__construct(Handler $handler, Queue $queue) : mixed
Parameters
fulfill()
Fulfills the promise.
public
fulfill(ResponseInterface $response) : void
Parameters
- $response : ResponseInterface
getHandler()
public
getHandler() : Handler
Return values
HandlergetId()
Returns the promise's id string.
public
getId() : string
Return values
stringgetRequest()
public
getRequest() : RequestInterface
Return values
RequestInterfacegetState()
public
getState() : mixed
Tags
reject()
Rejects the promise.
public
reject(ClientException $exception) : void
Parameters
- $exception : ClientException
then()
public
then([callable $onFulfilled = null ][, callable $onRejected = null ]) : mixed
Parameters
- $onFulfilled : callable = null
- $onRejected : callable = null
Tags
wait()
public
wait([mixed $unwrap = true ]) : mixed
Parameters
- $unwrap : mixed = true