YoastSEO_Vendor\GuzzleHttp\Promise
rejection_for() Yoast 1.0
Creates a rejected promise for a reason if the reason is not a promise. If the provided reason is a promise, then it is returned as-is.
Хуков нет.
Возвращает
PromiseInterface.
Использование
rejection_for( $reason );
- $reason(смешанный) (обязательный)
- Promise or reason.
Код rejection_for() rejection for Yoast 15.6.2
function rejection_for($reason)
{
if ($reason instanceof \YoastSEO_Vendor\GuzzleHttp\Promise\PromiseInterface) {
return $reason;
}
return new \YoastSEO_Vendor\GuzzleHttp\Promise\RejectedPromise($reason);
}