promisor = $promisor; } /** * {@inheritdoc} */ public function onResolve(callable $onResolved) { if ($this->promise === null) { $provider = $this->promisor; $this->promisor = null; $this->promise = call($provider); } $this->promise->onResolve($onResolved); } }