Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PromiseInterface.php

function PromiseInterface::otherwise

Same name in this branch
  1. 11.1.x vendor/react/promise/src/PromiseInterface.php \React\Promise\PromiseInterface::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.:

4 methods override PromiseInterface::otherwise()
Coroutine::otherwise in vendor/guzzlehttp/promises/src/Coroutine.php
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.
FulfilledPromise::otherwise in vendor/guzzlehttp/promises/src/FulfilledPromise.php
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.
Promise::otherwise in vendor/guzzlehttp/promises/src/Promise.php
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.
RejectedPromise::otherwise in vendor/guzzlehttp/promises/src/RejectedPromise.php
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.

File

vendor/guzzlehttp/promises/src/PromiseInterface.php, line 42

Class

PromiseInterface
A promise represents the eventual result of an asynchronous operation.

Namespace

GuzzleHttp\Promise

Code

public function otherwise(callable $onRejected) : PromiseInterface;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal