PHP Class GraphQL\Executor\Promise\Adapter\ReactPromiseAdapter

Inheritance: implements GraphQL\Executor\Promise\PromiseAdapter
Show file Open project: webonyx/graphql-php

Public Methods

Method Description
createPromise ( callable $resolver ) : React\Promise\PromiseInterface
createPromiseAll ( mixed $promisesOrValues ) : mixed Given an array of promises, return a promise that is fulfilled when all the items in the array are fulfilled.
createRejectedPromise ( $reason ) : RejectedPromise
createResolvedPromise ( $promiseOrValue = null ) : FulfilledPromise
isPromise ( mixed $value ) : boolean Return true if value is promise

Method Details

createPromise() public method

public createPromise ( callable $resolver ) : React\Promise\PromiseInterface
$resolver callable
return React\Promise\PromiseInterface

createPromiseAll() public method

Given an array of promises, return a promise that is fulfilled when all the items in the array are fulfilled.
public createPromiseAll ( mixed $promisesOrValues ) : mixed
$promisesOrValues mixed Promises or values.
return mixed a Promise

createRejectedPromise() public method

public createRejectedPromise ( $reason ) : RejectedPromise
return React\Promise\RejectedPromise

createResolvedPromise() public method

public createResolvedPromise ( $promiseOrValue = null ) : FulfilledPromise
return React\Promise\FulfilledPromise

isPromise() public method

Return true if value is promise
public isPromise ( mixed $value ) : boolean
$value mixed
return boolean