clue / readline-react
Experimental bindings for the readline extension (ext-readline)
dev-master
2017-01-29 13:29 UTC
Requires
- php: >=5.3
- ext-readline: *
- evenement/evenement: ~1.0|~2.0
- react/event-loop: ~0.3.0|~0.4.0
This package is auto-updated.
Last update: 2024-11-06 09:31:58 UTC
README
Experimental bindings for the readline extension (ext-readline)
Note: This project is in early alpha stage! Feel free to report any issues you encounter.
Quickstart example
Once installed, you can use the following code to present a prompt in a CLI program:
$readline = new Readline($loop, 'demo > '); $readline->on('line', function ($line) use ($readline) { var_dump($line); if ($line === 'quit' || $line === 'exit') { $readline->pause(); } });
See also the examples.
Install
The recommended way to install this library is through composer. New to composer?
{ "require": { "clue/readline-react": "dev-master" } }
License
MIT