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

Breadcrumb

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

function Promise::unwrap

Parameters

PromiseInterface<T> $promise:

Return value

PromiseInterface<T>

2 calls to Promise::unwrap()
Promise::cancel in vendor/react/promise/src/Promise.php
The `cancel()` method notifies the creator of the promise that there is no further interest in the results of the operation.
Promise::settle in vendor/react/promise/src/Promise.php

File

vendor/react/promise/src/Promise.php, line 234

Class

Promise
@template T @template-implements PromiseInterface<T>

Namespace

React\Promise

Code

private function unwrap(PromiseInterface $promise) : PromiseInterface {
    while ($promise instanceof self && null !== $promise->result) {
        
        /** @var PromiseInterface<T> $promise */
        $promise = $promise->result;
    }
    return $promise;
}

API Navigation

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