public function NotPromiseInstance::otherwise in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/promises/tests/NotPromiseInstance.php \GuzzleHttp\Promise\Tests\NotPromiseInstance::otherwise()
Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled.
Parameters
callable $onRejected Invoked when the promise is rejected.:
Return value
Overrides PromiseInterface::otherwise
File
- vendor/
guzzlehttp/ promises/ tests/ NotPromiseInstance.php, line 21
Class
Namespace
GuzzleHttp\Promise\TestsCode
public function otherwise(callable $onRejected) {
return $this
->then($onRejected);
}