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

Breadcrumb

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

function Utils::any

Like some(), with 1 as count. However, if the promise fulfills, the fulfillment value is not an array of 1 but the value directly.

Parameters

mixed $promises Promises or values.:

File

vendor/guzzlehttp/promises/src/Utils.php, line 226

Class

Utils

Namespace

GuzzleHttp\Promise

Code

public static function any($promises) : PromiseInterface {
    return self::some(1, $promises)->then(function ($values) {
        return $values[0];
    });
}

API Navigation

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