Promise implements Promise
AbstractYes
Table of Contents
Interfaces
- Promise
Methods
- __construct() : mixed
- fulfill() : void
- Fulfills the promise.
- getHandler() : mixed
- 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(mixed $handler, Queue $queue) : mixed
Parameters
- $handler : mixed
- $queue : Queue
fulfill()
Fulfills the promise.
public
fulfill(ResponseInterface $response) : void
Parameters
- $response : ResponseInterface
getHandler()
public
abstract getHandler() : mixed
getId()
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