PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
|
Public Member Functions | |
__construct (private PromiseSharedData $shared) | |
isResolved () | |
onCompletion (\Closure $onSuccess, \Closure $onFailure) | |
Static Public Member Functions | |
static | all (array $promises) |
@phpstan-template TValue
Definition at line 32 of file Promise.php.
pocketmine\promise\Promise::__construct | ( | private PromiseSharedData | $shared | ) |
Definition at line 38 of file Promise.php.
|
static |
Returns a promise that will resolve only once all the Promises in $promises
have resolved. The resolution value of the returned promise will be an array containing the resolution values of each Promises in $promises
indexed by the respective Promises' array keys.
Promise[] | $promises |
@phpstan-template TPromiseValue @phpstan-template TKey of array-key @phpstan-param non-empty-array<TKey, Promise<TPromiseValue>> $promises
@phpstan-return Promise<array<TKey, TPromiseValue>>
Definition at line 76 of file Promise.php.
pocketmine\promise\Promise::isResolved | ( | ) |
Definition at line 56 of file Promise.php.
pocketmine\promise\Promise::onCompletion | ( | \Closure | $onSuccess, |
\Closure | $onFailure ) |
@phpstan-param \Closure(TValue) : void $onSuccess @phpstan-param \Closure() : void $onFailure
Definition at line 44 of file Promise.php.