ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Functions | |
all (array $promises) | |
This file contains a set of functions that are useful for dealing with the Promise object. More... | |
race (array $promises) | |
The race function returns a promise that resolves or rejects as soon as one of the promises in the argument resolves or rejects. More... | |
resolve ($value) | |
Returns a Promise that resolves with the given value. More... | |
reject ($reason) | |
Returns a Promise that will reject with the given reason. More... | |
Sabre\Event\Promise\all | ( | array | $promises | ) |
This file contains a set of functions that are useful for dealing with the Promise object.
The returned Promise will resolve with a value that's an array of all the values the given promises have been resolved with.
This array will be in the exact same order as the array of input promises.
If any of the given Promises fails, the returned promise will immidiately fail with the first Promise that fails, and its reason.
Promise[] | $promises |
Definition at line 32 of file functions.php.
References $result, $success, and Sabre\Event\Promise\error().
Referenced by Slim\Http\Headers\all(), ilPCTable\importHtml(), Slim\Handlers\NotFound\renderHtmlNotFoundOutput(), Sabre\VObject\Parser\XmlTest\testRFC6321Example2(), and Sabre\DAVACL\Xml\Property\SupportedPrivilegeSetTest\testToHtml().
Sabre\Event\Promise\race | ( | array | $promises | ) |
The race function returns a promise that resolves or rejects as soon as one of the promises in the argument resolves or rejects.
The returned promise will resolve or reject with the value or reason of that first promise.
Promise[] | $promises |
Definition at line 71 of file functions.php.
References $promise, $result, and $success.
Referenced by Sabre\Event\Promise\FunctionsTest\testRace(), Sabre\Event\PromiseTest\testRace(), Sabre\Event\Promise\FunctionsTest\testRaceReject(), and Sabre\Event\PromiseTest\testRaceReject().
Sabre\Event\Promise\reject | ( | $reason | ) |
Returns a Promise that will reject with the given reason.
mixed | $reason |
Definition at line 129 of file functions.php.
References $promise.
Sabre\Event\Promise\resolve | ( | $value | ) |
Returns a Promise that resolves with the given value.
If the value is a promise, the returned promise will attach itself to that promise and eventually get the same state as the followed promise.
mixed | $value |
Definition at line 111 of file functions.php.
References $promise, and Sabre\Event\Promise\$value.
Referenced by Sabre\HTTP\Client\send(), Sabre\Event\Promise\FunctionsTest\testResolve(), Sabre\Event\Promise\FunctionsTest\testResolvePromise(), Sabre\Xml\Element\Uri\xmlDeserialize(), and Sabre\Xml\Element\Uri\xmlSerialize().