Created
October 11, 2016 20:05
-
-
Save WyriHaximus/b43608624d8b406cb7c2d2737c7222c8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| $s | |
| ->lift(function () { | |
| return new CutOperator(' '); | |
| }) | |
| ->map('json_decode') | |
| ->hydrate('Resource') | |
| ->subscribeCallback(function ($x) { | |
| echo "-" . $x . "-\n"; | |
| }); |
This file contains hidden or 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 | |
| $s | |
| ->lift(function () { | |
| return new CutOperator(' '); | |
| }) | |
| ->map('json_decode') | |
| ->map(function ($json) use ($hydrator) { | |
| return $hydrator->hydrate('Resource', $json); | |
| }) | |
| ->subscribeCallback(function ($x) { | |
| echo "-" . $x . "-\n"; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment