Promise represents a value that may not be available yet, but will be resolved at some point in future. It acts like a proxy to the actual value.
This interface is an extension of the promises/a+ specification.
Methods | ||
---|---|---|
public
|
then(callable|null $onFulfilled = null, callable|null $onRejected = null): Promise
|
# |
public
|
getState(): string
|
# |
public
|
wait(bool $unwrap = true): ($unwrap is true ? mixed : null)
|
# |
Constants | ||
---|---|---|
public
|
PENDING = 'pending'
|
# |
public
|
FULFILLED = 'fulfilled'
|
# |
public
|
REJECTED = 'rejected'
|
# |