PHP 인터페이스 GraphQL\Executor\Promise\PromiseAdapter

파일 보기 프로젝트 열기: webonyx/graphql-php 0 사용 예제들

공개 메소드들

메소드 설명
createPromise ( callable $resolver ) : GraphQL\Executor\Promise\Promise Creates a Promise
createPromiseAll ( mixed $promisesOrValues ) : GraphQL\Executor\Promise\Promise Given an array of promises, return a promise that is fulfilled when all the items in the array are fulfilled.
createRejectedPromise ( mixed $reason ) : GraphQL\Executor\Promise\Promise Creates a rejected promise for a reason if the reason is not a promise. If the provided reason is a promise, then it is returned as-is.
createResolvedPromise ( mixed $promiseOrValue = null ) : GraphQL\Executor\Promise\Promise Creates a full filed Promise for a value if the value is not a promise.
isPromise ( mixed $value ) : boolean Return true if value is promise

메소드 상세

createPromise() 공개 메소드

Creates a Promise
public createPromise ( callable $resolver ) : GraphQL\Executor\Promise\Promise
$resolver callable
리턴 GraphQL\Executor\Promise\Promise

createPromiseAll() 공개 메소드

Given an array of promises, return a promise that is fulfilled when all the items in the array are fulfilled.
public createPromiseAll ( mixed $promisesOrValues ) : GraphQL\Executor\Promise\Promise
$promisesOrValues mixed Promises or values.
리턴 GraphQL\Executor\Promise\Promise equivalent to Promise.all result

createRejectedPromise() 공개 메소드

Creates a rejected promise for a reason if the reason is not a promise. If the provided reason is a promise, then it is returned as-is.
public createRejectedPromise ( mixed $reason ) : GraphQL\Executor\Promise\Promise
$reason mixed
리턴 GraphQL\Executor\Promise\Promise a rejected promise

createResolvedPromise() 공개 메소드

Creates a full filed Promise for a value if the value is not a promise.
public createResolvedPromise ( mixed $promiseOrValue = null ) : GraphQL\Executor\Promise\Promise
$promiseOrValue mixed
리턴 GraphQL\Executor\Promise\Promise a full filed Promise

isPromise() 공개 메소드

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