PHP Classes
elePHPant
Icontem

Hydrogen Console: Process the shell console input and output

Recommend this page to a friend!
  Info   View files Documentation   View files View files (24)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-07-18 (9 days ago) RSS 2.0 feedNot enough user ratingsTotal: 72 This week: 2All time: 8,842 This week: 394Up
Version License PHP version Categories
hydrogen-console 1.0Custom (specified...7Console, PHP 7
Description Author

This package can process the shell console input and output.

There is one input class that processes the command line arguments and prompts the user for input values.

The output class can output text with a given foreground and background color, optionally underlined. It can also show a progress bar with a given size.

Name: walid laggoune <contact>
Classes: 4 packages by
Country: Algeria Algeria
Age: 16
All time rank: 33474 in Algeria Algeria
Week rank: 31 Up1 in Algeria Algeria Up

Details

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

  Files folder image Files  
File Role Description
Files folder imageConsole (3 directories)
Files folder imagetester (1 file)
Files folder imagetests (1 file)
Files folder imagevendor (1 file, 1 directory)
Accessible without login Plain text file app.php Aux. Auxiliary script
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  Console  
File Role Description
Files folder imageExceptions (1 file)
Files folder imageInput (4 directories)
Files folder imageOutput (3 directories)

  Files folder image Files  /  Console  /  Exceptions  
File Role Description
  Plain text file ConsoleException.php Class Class source

  Files folder image Files  /  Console  /  Input  
File Role Description
Files folder imageClasses (1 file)
Files folder imageCommands (1 file)
Files folder imageHelpers (1 file)
Files folder imageInterfaces (1 file)

  Files folder image Files  /  Console  /  Input  /  Classes  
File Role Description
  Plain text file Input.php Class Class source

  Files folder image Files  /  Console  /  Input  /  Commands  
File Role Description
  Plain text file ConsoleCommands.php Class Class source

  Files folder image Files  /  Console  /  Input  /  Helpers  
File Role Description
  Plain text file ReadLine.php Class Class source

  Files folder image Files  /  Console  /  Input  /  Interfaces  
File Role Description
  Plain text file InputInterface.php Class Class source

  Files folder image Files  /  Console  /  Output  
File Role Description
Files folder imageClasses (1 file)
Files folder imageHelpers (2 files)
Files folder imageInterfaces (3 files)

  Files folder image Files  /  Console  /  Output  /  Classes  
File Role Description
  Plain text file Output.php Class Class source

  Files folder image Files  /  Console  /  Output  /  Helpers  
File Role Description
  Plain text file ColorGenerator.php Class Class source
  Plain text file ProgressBar.php Class Class source

  Files folder image Files  /  Console  /  Output  /  Interfaces  
File Role Description
  Plain text file ColorGeneratorInterface.php Class Class source
  Plain text file OutputInterface.php Class Class source
  Plain text file ProgressBarInterface.php Class Class source

  Files folder image Files  /  tester  
File Role Description
  Plain text file OutputTester.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Accessible without login Plain text file OutputTest.php Test Unit test script

  Files folder image Files  /  vendor  
File Role Description
Files folder imagecomposer (7 files)
  Accessible without login Plain text file autoload.php Aux. Auxiliary script

  Files folder image Files  /  vendor  /  composer  
File Role Description
  Accessible without login Plain text file autoload_classmap.php Aux. Auxiliary script
  Accessible without login Plain text file autoload_namespaces.php Aux. Auxiliary script
  Accessible without login Plain text file autoload_psr4.php Aux. Auxiliary script
  Plain text file autoload_real.php Class Class source
  Plain text file autoload_static.php Class Class source
  Plain text file ClassLoader.php Class Class source
  Accessible without login Plain text file LICENSE Lic. License text

 Version Control Unique User Downloads Download Rankings  
 100%
Total:72
This week:2
All time:8,842
This week:394Up