YoastSEO_Vendor\GuzzleHttp\Promise
EachPromise::createPromise() private Yoast 1.0
{} Это метод класса: EachPromise{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
// private - только в коде основоного (родительского) класса $result = $this->createPromise();
Код EachPromise::createPromise() EachPromise::createPromise Yoast 15.6.2
private function createPromise()
{
$this->mutex = \false;
$this->aggregate = new \YoastSEO_Vendor\GuzzleHttp\Promise\Promise(function () {
\reset($this->pending);
if (empty($this->pending) && !$this->iterable->valid()) {
$this->aggregate->resolve(null);
return;
}
// Consume a potentially fluctuating list of promises while
// ensuring that indexes are maintained (precluding array_shift).
while ($promise = \current($this->pending)) {
\next($this->pending);
$promise->wait();
if ($this->aggregate->getState() !== \YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface::PENDING) {
return;
}
}
});
// Clear the references when the promise is resolved.
$clearFn = function () {
$this->iterable = $this->concurrency = $this->pending = null;
$this->onFulfilled = $this->onRejected = null;
};
$this->aggregate->then($clearFn, $clearFn);
}