done() публичный Метод

public done ( callable $onFulfilled = null, callable $onRejected = null )
$onFulfilled callable
$onRejected callable
Пример #1
0
 public function fromPromise(Promise $promise)
 {
     $json = null;
     $promise->done(function ($data) use(&$json) {
         $json = $data;
     });
     return new \Zend\Diactoros\Response\JsonResponse($json);
 }