X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fseekat;a=blobdiff_plain;f=examples%2Fcli.php;h=caae47c17d0c802b468a60bf5cb15f4b00364556;hp=fc72130200e41c390d9342d50e84057ca98bba01;hb=d38b3ae03472ba2f9af5009778574b23472bb3f7;hpb=e368287b3cd2dd40945ac8d1a1946bc32268007d diff --git a/examples/cli.php b/examples/cli.php index fc72130..caae47c 100755 --- a/examples/cli.php +++ b/examples/cli.php @@ -8,18 +8,18 @@ $api = new seekat\API(seekat\API\Future\react(), [ ]); array_shift($argv); -($self = function($error, $api) use(&$self) { +($self = function($api) use(&$self) { global $argv; while (null !== ($arg = array_shift($argv))) { if ("." === $arg) { - $api->when($self); + $api->then($self); return; } $api = $api->$arg; } echo $api, "\n"; -})(null, $api); +})($api); $api->send();