YoastSEO_Vendor\GuzzleHttp\Promise
unwrap() Yoast 1.0
Waits on all of the provided promises and returns the fulfilled values.
Returns an array that contains the value of each promise (in the same order the promises were provided). An exception is thrown if any of the promises are rejected.
Хуков нет.
Возвращает
Массив.
Использование
unwrap( $promises );
- $promises(смешанный) (обязательный)
- Iterable of PromiseInterface objects to wait on.
Код unwrap() unwrap Yoast 15.6.2
function unwrap($promises)
{
$results = [];
foreach ($promises as $key => $promise) {
$results[$key] = $promise->wait();
}
return $results;
}