Lines Matching refs:function

27 - Works with any object that has a `then` function.
43 `$onFulfilled` followed by an optional `$onRejected` function.
52 function ($value) {
56 function ($reason) {
80 ->then(function ($value) {
86 ->then(function ($value) {
112 ->then(function ($value) use ($nextPromise) {
116 ->then(function ($value) {
135 $promise->then(null, function ($reason) {
152 $promise->then(null, function ($reason) {
154 })->then(null, function ($reason) {
170 $promise->then(null, function ($reason) {
172 })->then(null, function ($reason) {
188 ->then(null, function ($reason) {
191 ->then(function ($value) {
201 method. When creating a promise, you can provide a wait function that is used
202 to synchronously force a promise to complete. When a wait function is invoked
204 wait function does not deliver a value, then an exception is thrown. The wait
205 function provided to a promise constructor is invoked when the `wait` function
209 $promise = new Promise(function () use (&$promise) {
217 If an exception is encountered while invoking the wait function of a promise,
221 $promise = new Promise(function () use (&$promise) {
229 function. It will simply return the previously resolved value.
232 $promise = new Promise(function () { die('this is not called!'); });
260 by passing `false` to the first argument of the `wait` function:
273 wait function will be the value delivered to promise B.
282 cancel function that when invoked cancels the action of computing a resolution
292 `$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is
293 expected to resolve the promise. `$cancelFn` is a function with no arguments
301 function () use (&$promise) {
304 function () {
363 $promise->then(function ($value) {
380 $promise->then(null, function ($reason) {
400 $guzzlePromise->then(function ($value) use ($reactPromise) {
458 $p = $p->then(function ($v) {
499 $promise->then(function ($value) { echo $value; });
508 …nctions conflicting between global and local copies of the package. The function API will be remov…