PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of walid laggoune   Hydrogen Console   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Hydrogen Console
Process the shell console input and output
Author: By
Last change: Update README.md
Update README.md
Date: 6 years ago
Size: 833 bytes
 

Contents

Class file image Download

hydrogen-console

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

Download the 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