PromiseInterface
in
HTTP promise interface
Tags
Table of Contents
Methods
- cancel() : void
- Cancel method
- catch() : PromiseInterface
- Method to set failure callable
- finally() : PromiseInterface
- Method to set finally callable
- forward() : PromiseInterface
- Forward method
- getCancel() : CallableObject|null
- Method to get cancel callable
- getFailure() : CallableObject|null
- Method to get failure callable
- getFinally() : CallableObject|null
- Method to get finally callable
- getPromiser() : Client|CurlMulti
- Method to get client promiser
- getState() : string
- Method to get current state
- getSuccess() : array<string|int, mixed>|CallableObject|null
- Method to get success callable
- hasCancel() : bool
- Method to check cancel callable
- hasFailure() : bool
- Method to check failure callable
- hasFinally() : bool
- Method to check finally callable
- hasPromiser() : bool
- Method to check client promiser
- hasState() : bool
- Method to check current state
- hasSuccess() : bool
- Method to check success callable
- isCancelled() : bool
- Determine is the promise is cancelled
- isFulfilled() : bool
- Determine is the promise is fulfilled
- isPending() : bool
- Determine is the promise is pending
- isRejected() : bool
- Determine is the promise is rejected
- resolve() : void
- Resolve method
- setCancel() : PromiseInterface
- Method to set cancel callable
- setFailure() : PromiseInterface
- Method to set failure callable
- setFinally() : PromiseInterface
- Method to set finally callable
- setPromiser() : PromiseInterface
- Method to set client promiser
- setState() : PromiseInterface
- Method to set current state
- setSuccess() : PromiseInterface
- Method to set success callable
- then() : PromiseInterface
- Then method
- wait() : Response|array<string|int, mixed>|null
- Wait method
Methods
cancel()
Cancel method
public
cancel() : void
catch()
Method to set failure callable
public
catch(mixed $failure[, bool $resolve = false ]) : PromiseInterface
Parameters
- $failure : mixed
- $resolve : bool = false
Return values
PromiseInterfacefinally()
Method to set finally callable
public
finally(mixed $finally[, bool $resolve = false ]) : PromiseInterface
Parameters
- $finally : mixed
- $resolve : bool = false
Return values
PromiseInterfaceforward()
Forward method
public
forward(PromiseInterface $nextPromise[, int $i = 0 ]) : PromiseInterface
Parameters
- $nextPromise : PromiseInterface
- $i : int = 0
Return values
PromiseInterfacegetCancel()
Method to get cancel callable
public
getCancel() : CallableObject|null
Return values
CallableObject|nullgetFailure()
Method to get failure callable
public
getFailure() : CallableObject|null
Return values
CallableObject|nullgetFinally()
Method to get finally callable
public
getFinally() : CallableObject|null
Return values
CallableObject|nullgetPromiser()
Method to get client promiser
public
getPromiser() : Client|CurlMulti
Return values
Client|CurlMultigetState()
Method to get current state
public
getState() : string
Return values
stringgetSuccess()
Method to get success callable
public
getSuccess([int|null $i = null ]) : array<string|int, mixed>|CallableObject|null
Parameters
- $i : int|null = null
Return values
array<string|int, mixed>|CallableObject|nullhasCancel()
Method to check cancel callable
public
hasCancel() : bool
Return values
boolhasFailure()
Method to check failure callable
public
hasFailure() : bool
Return values
boolhasFinally()
Method to check finally callable
public
hasFinally() : bool
Return values
boolhasPromiser()
Method to check client promiser
public
hasPromiser() : bool
Return values
boolhasState()
Method to check current state
public
hasState() : bool
Return values
boolhasSuccess()
Method to check success callable
public
hasSuccess([int|null $i = null ]) : bool
Parameters
- $i : int|null = null
Return values
boolisCancelled()
Determine is the promise is cancelled
public
isCancelled() : bool
Return values
boolisFulfilled()
Determine is the promise is fulfilled
public
isFulfilled() : bool
Return values
boolisPending()
Determine is the promise is pending
public
isPending() : bool
Return values
boolisRejected()
Determine is the promise is rejected
public
isRejected() : bool
Return values
boolresolve()
Resolve method
public
resolve() : void
setCancel()
Method to set cancel callable
public
setCancel(mixed $cancel) : PromiseInterface
Parameters
- $cancel : mixed
Return values
PromiseInterfacesetFailure()
Method to set failure callable
public
setFailure(mixed $failure) : PromiseInterface
Parameters
- $failure : mixed
Return values
PromiseInterfacesetFinally()
Method to set finally callable
public
setFinally(mixed $finally) : PromiseInterface
Parameters
- $finally : mixed
Return values
PromiseInterfacesetPromiser()
Method to set client promiser
public
setPromiser(Client|CurlMulti $promiser) : PromiseInterface
Parameters
Return values
PromiseInterfacesetState()
Method to set current state
public
setState(string $state) : PromiseInterface
Parameters
- $state : string
Return values
PromiseInterfacesetSuccess()
Method to set success callable
public
setSuccess(mixed $success) : PromiseInterface
Parameters
- $success : mixed
Return values
PromiseInterfacethen()
Then method
public
then(mixed $success[, bool $resolve = false ]) : PromiseInterface
Parameters
- $success : mixed
- $resolve : bool = false
Return values
PromiseInterfacewait()
Wait method
public
wait([bool $unwrap = true ]) : Response|array<string|int, mixed>|null
Parameters
- $unwrap : bool = true