PHP Classes

Hydrogen Console: Process the shell console input and output

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 86 All time: 10,018 This week: 560Up
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.

Picture of LAGGOUNE Walid
  Performance   Level  
Name: LAGGOUNE Walid <contact>
Classes: 8 packages by
Country: Algeria Algeria
Innovation award
Innovation award
Nominee: 3x

Documentation

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 (24)  
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 (24)  /  Console  
File Role Description
Files folder imageExceptions (1 file)
Files folder imageInput (4 directories)
Files folder imageOutput (3 directories)

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

  Files folder image Files (24)  /  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 (24)  /  Console  /  Input  /  Classes  
File Role Description
  Plain text file Input.php Class Class source

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

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

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

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

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

  Files folder image Files (24)  /  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 (24)  /  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 (24)  /  tester  
File Role Description
  Plain text file OutputTester.php Class Class source

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

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

  Files folder image Files (24)  /  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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:86
This week:0
All time:10,018
This week:560Up