PHP 트레잇 Kraken\Promise\Partial\PromiseTrait

파일 보기 프로젝트 열기: kraken-php/framework

공개 메소드들

메소드 설명
all ( Kraken\Promise\PromiseInterface[] | mixed[] $promisesOrValues ) : Kraken\Promise\PromiseInterface Return Promise that will resolve only once all the items in $promisesOrValues have resolved.
any ( Kraken\Promise\PromiseInterface[] | mixed[] $promisesOrValues ) : Kraken\Promise\PromiseInterface Return a promise that will resolve when any one of the items in $promisesOrValues resolves.
doCancel ( Kraken\Promise\PromiseInterface | mixed $promiseOrValue = null ) : Kraken\Promise\PromiseInterface Cancel Promise or value.
doReject ( Kraken\Promise\PromiseInterface | mixed $promiseOrValue = null ) : Kraken\Promise\PromiseInterface Reject Promise or value.
doResolve ( Kraken\Promise\PromiseInterface | mixed $promiseOrValue = null ) : Kraken\Promise\PromiseInterface Resolve Promise or value.
map ( Kraken\Promise\PromiseInterface[] | mixed[] $promisesOrValues, callable $mapFunc ) : Kraken\Promise\PromiseInterface Map promises and/or values using specified $mapFunc.
race ( Kraken\Promise\PromiseInterface[] | mixed[] $promisesOrValues ) : Kraken\Promise\PromiseInterface Initiate a competitive race that allows one winner.
reduce ( Kraken\Promise\PromiseInterface[] | mixed[] $promisesOrValues, callable $reduceFunc, Kraken\Promise\PromiseInterface | mixed | null $initialValue = null ) : Kraken\Promise\PromiseInterface Reduce Promises and/or values using $reduceFunc with $initialValue being Promise or primitive value.
some ( Kraken\Promise\PromiseInterface[] | mixed[] $promisesOrValues, integer $howMany ) : Kraken\Promise\PromiseInterface Return Promise that will resolve when $howMany of the supplied items in $promisesOrValues resolve.

메소드 상세

all() 공개 정적인 메소드

Return Promise that will resolve only once all the items in $promisesOrValues have resolved. The resolution value of the returned promise will be an array containing the resolution values of each of the items in $promisesOrValues.
public static all ( Kraken\Promise\PromiseInterface[] | mixed[] $promisesOrValues ) : Kraken\Promise\PromiseInterface
$promisesOrValues Kraken\Promise\PromiseInterface[] | mixed[]
리턴 Kraken\Promise\PromiseInterface

any() 공개 정적인 메소드

Return a promise that will resolve when any one of the items in $promisesOrValues resolves. The resolution value of the returned promise will be the resolution value of the triggering item.
public static any ( Kraken\Promise\PromiseInterface[] | mixed[] $promisesOrValues ) : Kraken\Promise\PromiseInterface
$promisesOrValues Kraken\Promise\PromiseInterface[] | mixed[]
리턴 Kraken\Promise\PromiseInterface

doCancel() 공개 정적인 메소드

Cancel Promise or value.
public static doCancel ( Kraken\Promise\PromiseInterface | mixed $promiseOrValue = null ) : Kraken\Promise\PromiseInterface
$promiseOrValue Kraken\Promise\PromiseInterface | mixed
리턴 Kraken\Promise\PromiseInterface

doReject() 공개 정적인 메소드

Reject Promise or value.
public static doReject ( Kraken\Promise\PromiseInterface | mixed $promiseOrValue = null ) : Kraken\Promise\PromiseInterface
$promiseOrValue Kraken\Promise\PromiseInterface | mixed
리턴 Kraken\Promise\PromiseInterface

doResolve() 공개 정적인 메소드

Resolve Promise or value.
public static doResolve ( Kraken\Promise\PromiseInterface | mixed $promiseOrValue = null ) : Kraken\Promise\PromiseInterface
$promiseOrValue Kraken\Promise\PromiseInterface | mixed
리턴 Kraken\Promise\PromiseInterface

map() 공개 정적인 메소드

Map promises and/or values using specified $mapFunc.
또한 보기: array_map
public static map ( Kraken\Promise\PromiseInterface[] | mixed[] $promisesOrValues, callable $mapFunc ) : Kraken\Promise\PromiseInterface
$promisesOrValues Kraken\Promise\PromiseInterface[] | mixed[]
$mapFunc callable
리턴 Kraken\Promise\PromiseInterface

race() 공개 정적인 메소드

Initiate a competitive race that allows one winner. Returns a promise which is resolved in the same way the first settled promise resolves.
public static race ( Kraken\Promise\PromiseInterface[] | mixed[] $promisesOrValues ) : Kraken\Promise\PromiseInterface
$promisesOrValues Kraken\Promise\PromiseInterface[] | mixed[]
리턴 Kraken\Promise\PromiseInterface

reduce() 공개 정적인 메소드

Reduce Promises and/or values using $reduceFunc with $initialValue being Promise or primitive value.
또한 보기: array_reduce
public static reduce ( Kraken\Promise\PromiseInterface[] | mixed[] $promisesOrValues, callable $reduceFunc, Kraken\Promise\PromiseInterface | mixed | null $initialValue = null ) : Kraken\Promise\PromiseInterface
$promisesOrValues Kraken\Promise\PromiseInterface[] | mixed[]
$reduceFunc callable
$initialValue Kraken\Promise\PromiseInterface | mixed | null
리턴 Kraken\Promise\PromiseInterface

some() 공개 정적인 메소드

Return Promise that will resolve when $howMany of the supplied items in $promisesOrValues resolve. The resolution value of the returned promise will be an array of length $howMany containing the resolution values of the triggering items.
public static some ( Kraken\Promise\PromiseInterface[] | mixed[] $promisesOrValues, integer $howMany ) : Kraken\Promise\PromiseInterface
$promisesOrValues Kraken\Promise\PromiseInterface[] | mixed[]
$howMany integer
리턴 Kraken\Promise\PromiseInterface