WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

YoastSEO_Vendor\GuzzleHttp\Promise

settle() Yoast 1.0

Returns a promise that is fulfilled when all of the provided promises have been fulfilled or rejected.

The returned promise is fulfilled with an array of inspection state arrays.

Хуков нет.

Возвращает

PromiseInterface.

Использование

settle( $promises );
$promises(разное) (обязательный)
Promises or values.

Заметки

  • Смотрите: GuzzleHttp\Promise\inspect for the inspection state array format.

Код settle() Yoast 17.1

function settle($promises)
{
    $results = [];
    return \each($promises, function ($value, $idx) use(&$results) {
        $results[$idx] = ['state' => \YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface::FULFILLED, 'value' => $value];
    }, function ($reason, $idx) use(&$results) {
        $results[$idx] = ['state' => \YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface::REJECTED, 'reason' => $reason];
    })->then(function () use(&$results) {
        \ksort($results);
        return $results;
    });
}