Ejemplo n.º 1
0
 public function then(callable $onFulfilled = null, callable $onRejected = null)
 {
     $dependentPromise = new DependentPromise([], $this->getId(), $onFulfilled, $onRejected);
     $result = $this->wait(false);
     $promiseData = $dependentPromise->resolve($result);
     return $promiseData;
 }
Ejemplo n.º 2
0
 public function then(callable $onFulfilled = null, callable $onRejected = null)
 {
     $dependentPromise = new DependentPromise([], $this->getId(), $onFulfilled, $onRejected);
     $dependentPromiseData = $dependentPromise->getData();
     return $dependentPromiseData;
 }