dilawsky / hydrogen-console
CLI library to work with inputs/outputs from/to the gnu/linux terminal.
dev-master
2017-07-17 16:10 UTC
This package is auto-updated.
Last update: 2024-04-29 03:50:39 UTC
README
CLI library to work with inputs/outputs from/to the gnu/linux terminal .
License
MIT
Requirements
- php7.
- Input/output streams local.
- exec function activated.
- Gnu/Linux system or mac os (not working on Microsoft Widnows).
Install
composer require dilawsky/hydrogen-console dev-master
DOCS
Simple example
<?php require "vendor/autoload.php"; use Console\Input\Classes\Input as Input; use Console\Output\Classes\Output as Output; $Input = new Input; $Output = new Output; $Input->process($argv); $Input->ask("Would you like a tea ?", function($answer) use ($Output) { if($answer === "yes") { $Output->write("preparing the tea ...","green"); } }); ?>
Contact
walidlaggoune159@gmail.com