@@ -25,12 +25,10 @@ Table of Contents
25
25
* [ Deferred::reject()] ( #deferredreject )
26
26
* [ PromiseInterface] ( #promiseinterface )
27
27
* [ PromiseInterface::then()] ( #promiseinterfacethen )
28
- * [ ExtendedPromiseInterface] ( #extendedpromiseinterface )
29
- * [ ExtendedPromiseInterface::done()] ( #extendedpromiseinterfacedone )
30
- * [ ExtendedPromiseInterface::otherwise()] ( #extendedpromiseinterfaceotherwise )
31
- * [ ExtendedPromiseInterface::always()] ( #extendedpromiseinterfacealways )
32
- * [ CancellablePromiseInterface] ( #cancellablepromiseinterface )
33
- * [ CancellablePromiseInterface::cancel()] ( #cancellablepromiseinterfacecancel )
28
+ * [ PromiseInterface::done()] ( #promiseinterfacedone )
29
+ * [ PromiseInterface::otherwise()] ( #promiseinterfaceotherwise )
30
+ * [ PromiseInterface::always()] ( #promiseinterfacealways )
31
+ * [ PromiseInterface::cancel()] ( #promiseinterfacecancel )
34
32
* [ Promise] ( #promise-1 )
35
33
* [ FulfilledPromise] ( #fulfilledpromise )
36
34
* [ RejectedPromise] ( #rejectedpromise )
@@ -193,22 +191,10 @@ the same call to `then()`:
193
191
194
192
* [ resolve()] ( #resolve ) - Creating a resolved promise
195
193
* [ reject()] ( #reject ) - Creating a rejected promise
196
- * [ ExtendedPromiseInterface ::done()] ( #extendedpromiseinterfacedone )
194
+ * [ PromiseInterface ::done()] ( #promiseinterfacedone )
197
195
* [ done() vs. then()] ( #done-vs-then )
198
196
199
- ### ExtendedPromiseInterface
200
-
201
- The ExtendedPromiseInterface extends the PromiseInterface with useful shortcut
202
- and utility methods which are not part of the Promises/A specification.
203
-
204
- #### Implementations
205
-
206
- * [ Promise] ( #promise-1 )
207
- * [ FulfilledPromise] ( #fulfilledpromise )
208
- * [ RejectedPromise] ( #rejectedpromise )
209
- * [ LazyPromise] ( #lazypromise )
210
-
211
- #### ExtendedPromiseInterface::done()
197
+ #### PromiseInterface::done()
212
198
213
199
``` php
214
200
$promise->done(callable $onFulfilled = null, callable $onRejected = null);
@@ -228,7 +214,7 @@ Since the purpose of `done()` is consumption rather than transformation,
228
214
* [ PromiseInterface::then()] ( #promiseinterfacethen )
229
215
* [ done() vs. then()] ( #done-vs-then )
230
216
231
- #### ExtendedPromiseInterface ::otherwise()
217
+ #### PromiseInterface ::otherwise()
232
218
233
219
``` php
234
220
$promise->otherwise(callable $onRejected);
@@ -254,7 +240,7 @@ $promise
254
240
)};
255
241
```
256
242
257
- #### ExtendedPromiseInterface ::always()
243
+ #### PromiseInterface ::always()
258
244
259
245
``` php
260
246
$newPromise = $promise->always(callable $onFulfilledOrRejected);
@@ -301,13 +287,7 @@ return doSomething()
301
287
->always('cleanup');
302
288
```
303
289
304
- ### CancellablePromiseInterface
305
-
306
- A cancellable promise provides a mechanism for consumers to notify the creator
307
- of the promise that they are not longer interested in the result of an
308
- operation.
309
-
310
- #### CancellablePromiseInterface::cancel()
290
+ #### PromiseInterface::cancel()
311
291
312
292
``` php
313
293
$promise->cancel();
@@ -319,13 +299,6 @@ further interest in the results of the operation.
319
299
Once a promise is settled (either fulfilled or rejected), calling ` cancel() ` on
320
300
a promise has no effect.
321
301
322
- #### Implementations
323
-
324
- * [ Promise] ( #promise-1 )
325
- * [ FulfilledPromise] ( #fulfilledpromise )
326
- * [ RejectedPromise] ( #rejectedpromise )
327
- * [ LazyPromise] ( #lazypromise )
328
-
329
302
### Promise
330
303
331
304
Creates a promise whose state is controlled by the functions passed to
@@ -435,11 +408,6 @@ a trusted promise that follows the state of the thenable is returned.
435
408
436
409
If ` $promiseOrValue ` is a promise, it will be returned as is.
437
410
438
- Note: The promise returned is always a promise implementing
439
- [ ExtendedPromiseInterface] ( #extendedpromiseinterface ) . If you pass in a custom
440
- promise which only implements [ PromiseInterface] ( #promiseinterface ) , this
441
- promise will be assimilated to a extended promise following ` $promiseOrValue ` .
442
-
443
411
#### reject()
444
412
445
413
``` php
0 commit comments