function PromiseInterface::then
Same name in this branch
- 11.1.x vendor/react/promise/src/PromiseInterface.php \React\Promise\PromiseInterface::then()
Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler.
Parameters
callable $onFulfilled Invoked when the promise fulfills.:
callable $onRejected Invoked when the promise is rejected.:
4 methods override PromiseInterface::then()
- Coroutine::then in vendor/
guzzlehttp/ promises/ src/ Coroutine.php - Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler.
- FulfilledPromise::then in vendor/
guzzlehttp/ promises/ src/ FulfilledPromise.php - Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler.
- Promise::then in vendor/
guzzlehttp/ promises/ src/ Promise.php - Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler.
- RejectedPromise::then in vendor/
guzzlehttp/ promises/ src/ RejectedPromise.php - Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler.
File
-
vendor/
guzzlehttp/ promises/ src/ PromiseInterface.php, line 29
Class
- PromiseInterface
- A promise represents the eventual result of an asynchronous operation.
Namespace
GuzzleHttp\PromiseCode
public function then(?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface;