Automattic\WooCommerce\Vendor\GraphQL\Executor\Promise\Adapter
AmpFutureAdapter::unwrapResult
Method of the class: AmpFutureAdapter{}
No Hooks.
Returns
Mixed.
Usage
$result = AmpFutureAdapter::unwrapResult( $value );
- $value(mixed) (required)
- .
AmpFutureAdapter::unwrapResult() AmpFutureAdapter::unwrapResult code WC 10.9.1
protected static function unwrapResult($value)
{
if ($value instanceof Promise) {
$value = $value->adoptedPromise;
}
if ($value instanceof Future) {
return $value->await();
}
return $value;
}