Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Commit

Permalink
Fixing promise forwarding by implementing PromiseInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling committed Feb 26, 2015
1 parent a1da305 commit 0f6a82e
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/Future/FutureInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* computation has not yet completed when wait() is called, the call to wait()
* will block until the future has completed.
*/
interface FutureInterface extends PromisorInterface
interface FutureInterface extends PromiseInterface, PromisorInterface
{
/**
* Returns the result of the future either from cache or by blocking until
Expand All @@ -37,20 +37,4 @@ public function wait();
* Cancels the future, if possible.
*/
public function cancel();

/**
* Create and return a promise that invokes the given methods when the
* future has a value, exception, or progress events.
*
* @param callable $onFulfilled Called when the promise is resolved.
* @param callable $onRejected Called when the promise is rejected.
* @param callable $onProgress Called on progress events.
*
* @return PromiseInterface
*/
public function then(
callable $onFulfilled = null,
callable $onRejected = null,
callable $onProgress = null
);
}

0 comments on commit 0f6a82e

Please sign in to comment.