Last active
October 27, 2015 20:35
-
-
Save cboden/8e6f60e7cdf7304ebd40 to your computer and use it in GitHub Desktop.
Observables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface Disposable { | |
public function dispose(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface Observable { | |
/** | |
* @return Disposable | |
*/ | |
public function subscribe(Observer $observer); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface Observer { | |
public function onNext(); | |
public function onError(\Exception $error); | |
public function onCompleted(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment