The Hoa\Console library.

Overview

Hoa


Build status Code coverage Packagist License

Hoa is a modular, extensible and structured set of PHP libraries.
Moreover, Hoa aims at being a bridge between industrial and research worlds.

Hoa\Console

Help on IRC Help on Gitter Documentation Board

This library allows to interact easily with a terminal: getoption, cursor, window, processus, readline etc.

Learn more.

Installation

With Composer, to include this library into your dependencies, you need to require hoa/console:

$ composer require hoa/console '~3.0'

For more installation procedures, please read the Source page.

Testing

Before running the test suites, the development dependencies must be installed:

$ composer install

Then, to run all the test suites:

$ vendor/bin/hoa test:run

For more information, please read the contributor guide.

Quick usage

We propose a quick overview of some features: cursor, window, readline, processus and finally getoption.

Cursor

The Hoa\Console\Cursor class allows to manipulate the cursor. Here is a list of some operations:

  • move,
  • moveTo,
  • save,
  • restore,
  • clear,
  • hide,
  • show,
  • getPosition,
  • colorize,
  • etc.

The API is very straightforward. For example, we can use l, left or to move the cursor on the left column. Thus we move the cursor to the left 3 times and then to the top 2 times:

Hoa\Console\Cursor::move('left left left up up');

… or with Unicode symbols:

Hoa\Console\Cursor::move('← ← ← ↑ ↑');

This method moves the cursor relatively from its current position, but we are able to move the cursor to absolute coordinates:

Hoa\Console\Cursor::moveTo(13, 42);

We are also able to save the current cursor position, to move, clear etc., and then to restore the saved position:

Hoa\Console\Cursor::save();     // save
Hoa\Console\Cursor::move('↓');  // move below
Hoa\Console\Cursor::clear('↔'); // clear the line
echo 'Something below…';        // write something
Hoa\Console\Cursor::restore();  // restore

Another example with colors:

Hoa\Console\Cursor::colorize(
    'underlined foreground(yellow) background(#932e2e)'
);

Please, read the API documentation for more informations.

Mouse

The Hoa\Console\Mouse class allows to listen the mouse actions and provides the following listeners: mouseup, mousedown, wheelup and wheeldown. Example:

$mouse = Hoa\Console\Mouse::getInstance();
$mouse->on('mousedown', function ($bucket) {
    print_r($bucket->getData());
});

$mouse::track();

And then, when we left-click, we will see:

Array
(
    [x] => 69
    [y] => 30
    [button] => left
    [shift] =>
    [meta] =>
    [ctrl] =>
)

When we left-click while hiting the shift key, we will see:

Array
(
    [x] => 71
    [y] => 32
    [button] => left
    [shift] => 1
    [meta] =>
    [ctrl] =>
)

This is an experimental API.

Window

The Hoa\Console\Window class allows to manipulate the window. Here is a list of some operations:

  • setSize,
  • getSize,
  • moveTo,
  • getPosition,
  • scroll,
  • minimize,
  • restore,
  • raise,
  • setTitle,
  • getTitle,
  • copy,
  • etc.

Furthermore, we have the hoa://Event/Console/Window:resize event channel to listen when the window has been resized.

For example, we resize the window to 40 lines and 80 columns, and then we move the window to 400px horizontally and 100px vertically:

Hoa\Console\Window::setSize(40, 80);
Hoa\Console\Window::moveTo(400, 100);

If we do not like our user, we are able to minimize its window:

Hoa\Console\Window::minimize();
sleep(2);
Hoa\Console\Window::restore();

We are also able to set or get the title of the window:

Hoa\Console\Window::setTitle('My awesome application');

Finally, if we have a complex application layout, we can repaint it when the window is resized by listening the hoa://Event/Console/Window:resize event channel:

Hoa\Event\Event::getEvent('hoa://Event/Console/Window:resize')
    ->attach(function (Hoa\Event\Bucket $bucket) {
        $data = $bucket->getData();
        $size = $data['size'];

        echo
            'New dimensions: ', $size['x'], ' lines x ',
            $size['y'], ' columns.', "\n";
    });

Please, read the API documentation for more informations

Readline

The Hoa\Console\Readline\Readline class provides an advanced readline which allows the following operations:

  • edition,
  • history,
  • autocompletion.

It supports UTF-8. It is based on bindings, and here are some:

  • arrow up and arrow down: move in the history,
  • arrow left and arrow right: move the cursor left and right,
  • Ctrl-A: move to the beginning of the line,
  • Ctrl-E: move to the end of the line,
  • Ctrl-B: move backward of one word,
  • Ctrl-F: move forward of one word,
  • Ctrl-W: delete first backard word,
  • Backspace: delete first backward character,
  • Enter: submit the line,
  • Tab: autocomplete.

Thus, to read one line:

$readline = new Hoa\Console\Readline\Readline();
$line     = $readline->readLine('> '); // “> ” is the prefix of the line.

The Hoa\Console\Readline\Password allows the same operations but without printing on STDOUT.

$password = new Hoa\Console\Readline\Password();
$line     = $password->readLine('password: ');

We are able to add a mapping with the help of the Hoa\Console\Readline\Readline::addMapping method. We use \e[… for \033[, \C-… for Ctrl-… and a character for the rest. We can associate a character or a callable:

$readline->addMapping('a', 'z'); // crazy, we replace “a” by “z”.
$readline->addMapping('\C-R', function ($readline) {
    // do something when pressing Ctrl-R.
});

We are also able to manipulate the history, thanks to the addHistory, clearHistory, getHistory, previousHistory and nextHistory methods on the Hoa\Console\Readline\Readline class.

Finally, we have autocompleters that are enabled on Tab. If one solution is proposed, it will be inserted directly. If many solutions are proposed, we are able to navigate in a menu to select the solution (with the help of keyboard arrows, Enter, Esc etc.). Also, we are able to combine autocompleters. The following example combine the Word and Path autocompleters:

$functions = get_defined_functions();
$readline->setAutocompleter(
    new Hoa\Console\Readline\Autocompleter\Aggregate([
        new Hoa\Console\Readline\Autocompleter\Path(),
        new Hoa\Console\Readline\Autocompleter\Word($functions['internal'])
    ])
);

Here is an example of the result:

Autocompleters in action

On Windows, a readline is equivalent to a simple fgets(STDIN).

Processus

The Hoa\Console\Processus class allows to manipulate processus as a stream which implements Hoa\Stream\IStream\In, Hoa\Stream\IStream\Out and Hoa\Stream\IStream\Pathable interfaces (please, see the Hoa\Stream library).

Basically, we can read STDOUT like this:

$processus = new Hoa\Console\Processus('ls');
$processus->open();
echo $processus->readAll();

And we can write on STDIN like this:

$processus->writeAll('foobar');

etc. This is very classical.

Hoa\Console\Processus also proposes many events: start, stop, input, output and timeout. Thus:

$processus = new Hoa\Console\Processus('ls');
$processus->on('output', function (Hoa\Event\Bucket $bucket) {
    $data = $bucket->getData();
    echo '> ', $data['line'], "\n";
});
$processus->run();

We are also able to read and write on more pipes than 0 (STDOUT), 1 (STDIN) and 2 (STDERR). In the same way, we can set the current working directory of the processus and its environment.

We can quickly execute a processus without using a stream with the help of the Hoa\Console\Processus::execute method.

GetOption

The Hoa\Console\Parser and Hoa\Console\GetOption classes allow to parse a command-line and get options and inputs values easily.

First, we need to parse a command-line, such as:

$parser = new Hoa\Console\Parser();
$parser->parse('-s --long=value input');

Second, we need to define our options:

$options = new Hoa\Console\GetOption(
    [
        // long name              type                  short name
        //  ↓                      ↓                         ↓
        ['short', Hoa\Console\GetOption::NO_ARGUMENT,       's'],
        ['long',  Hoa\Console\GetOption::REQUIRED_ARGUMENT, 'l']
    ],
    $parser
);

And finally, we iterate over options:

$short = false;
$long  = null;

//          short name                  value
//               ↓                        ↓
while (false !== $c = $options->getOption($v)) {
    switch ($c) {
        case 's':
            $short = true;

            break;

        case 'l':
            $long = $v;

            break;
    }
}

var_dump($short, $long); // bool(true) and string(5) "value".

Please, see API documentation of Hoa\Console\Parser to see all supported forms of options (flags or switches, long or short ones, inputs etc.).

It also support typos in options. In this case, we have to add:

    case '__ambiguous':
        $options->resolveOptionAmbiguity($v);

        break;

If one solution is found, it will select this one automatically, else it will raise an exception. This exception is caught by Hoa\Console\Dispatcher\Kit when using the hoa script and a prompt is proposed.

Thanks to the Hoa\Router library and the Hoa\Dispatcher library (with its dedicated kit Hoa\Console\Dispatcher\Kit), we are able to build commands easily. Please, see all Bin/ directories in different libraries (for example Hoa\Cli\Bin\Resolve) and Hoa/Cli/Bin/Hoa.php to learn more.

Awecode

The following awecodes show this library in action:

  • Hoa\Console\Readline: why and how to use Hoa\Console\Readline? Simple examples will help us to use default shortcuts and we will even see the auto-completion,
  • Hoa\Websocket: why and how to use Hoa\Websocket\Server and Hoa\Websocket\Client? A simple example will illustrate the WebSocket protocol.

Documentation

The hack book of Hoa\Console contains detailed information about how to use this library and how it works.

To generate the documentation locally, execute the following commands:

$ composer require --dev hoa/devtools
$ vendor/bin/hoa devtools:documentation --open

More documentation can be found on the project's website: hoa-project.net.

Getting help

There are mainly two ways to get help:

Contribution

Do you want to contribute? Thanks! A detailed contributor guide explains everything you need to know.

License

Hoa is under the New BSD License (BSD-3-Clause). Please, see LICENSE for details.

Related projects

The following projects are using this library:

  • PsySH, A runtime developer console, interactive debugger and REPL for PHP.
Comments
  • Remove error on cygwin emulator

    Remove error on cygwin emulator

    Its related to issue #36 and the error

    Uncaught exception (Hoa\Console\Exception):
    Hoa\Console\Tput::parse(): (0) Terminfo file (null) does not exist.
    in C:\www\Console\Tput.php at line 615.
    

    On cygwin emulator, we use default term as "windows-ansi"

    bug 
    opened by thehawk970 20
  • Enhancements

    Enhancements

    Hoa\Console\Cursor::move('← ← ← ↑ ↑'); Hoa\Console\Cursor::move('↓'); // move below Hoa\Console\Cursor::clear('↔'); // clear the line

    Can you guys please change (←,↑,↔) to use words than using symbols. There is no way i can find those keys in my keyboard. I dont use a Mac.

    Edit: My mistake, didnt check "For example, we can use l, left or ← to move the cursor on the left column. Thus we move the cursor to the left 3 times and then to the top 2 times:"

    enhancement question 
    opened by itskevinsam 20
  • Added in autocomplete ability to Readline

    Added in autocomplete ability to Readline

    Added in tab to auto-complete functionality to Console\Readline

    When tab is pressed, the function set with ->setAutocomplete() will be called with 2 parameters. The first parameter is all the text before the currently tabbed on word. The second parameter is the currently tabbed on words. The function should return an array of all the possible auto-completions. There are 3 cases:

    More than 1 result All results are displayed, then the line is auto-completed as far as possible

    Exactly 1 result The line is completed

    No results Nothing happens


    Also moved the setting and restoring of the STTY to public functions so the user can set and restore as needed.

    opened by mrkmg 19
  • Add TMUX(1) support for `Window::copy`

    Add TMUX(1) support for `Window::copy`

    Fix #52.

    Two steps (one more is required to get something clean, in another issue):

    1. Add the Console::isTmuxRunning method,
    2. Add TMUX(1) support on Window::copy.

    To check whether TMUX(1) is running, we use the following Shell command (see Parameter expansion):

    echo ${TMUX:-"no"}
    

    I first used ${TMUX?} but it prints an error on stderr if the variable is not defined. This “trick” is still clean though.

    To add TMUX(1) support on Window::copy, we use information on this URL: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324. We learn there is a special form to by-pass TMUX(1) and send control sequences to the upper terminal. We have to use the:

    \033Ptmux;…\033\\
    

    control sequence where is the original control sequence where \033 are doubled.

    This PR is ready to be reviewed.

    The next step is to have a unified way to write on the output (so far we only do echo and it sucks sometimes, e.g. with Window::copy; it is only more difficult to embed, /cc @jubianchi). I am opening a new issue right now.

    I am assigning @jubianchi for the review.

    bug difficulty: medium 
    opened by Hywan 17
  • Introduce the `Input` class

    Introduce the `Input` class

    Old title

    Imagine this case:

    $ php foo.php
    

    where foo.php is a program that reads from STDIN. It works perfectly with Hoa\Console.

    Now, imagine this other case:

    $ echo "foo\nbar" | php foo.php
    

    STDIN will contain foo and bar but the Hoa\Console\Cursor —for instance— will no longer work since it reads from STDIN too.

    The idea is then to close STDIN (aka php://input) and open /dev/tty, which is the real standard input in this case.

    So, to address these needs, we introduce the Hoa\Console::getStdin method that is a helper to choose the appopriate standard input. We also change the Hoa\Console::advancedInteraction behavior: 👷 stty uses the -f option to specify /dev/tty instead of the default standard input. However, on Linux, this is -F. I don't know how to address this right now (I mean: Making something cross-platform).

    Finally, all Hoa\Console's classes that were using STDIN directly are now using Hoa\Console::getStdin.

    New title

    Actually, since #55, this PR has taken a new path. We also introduced an Input class. And it considers whether to use Hoa\File\Read('php://stdin') as the default input, or Hoa\File\Read('/dev/tty') in case the former has been closed. This is a basic wrapper.

    enhancement difficulty: medium 
    opened by Hywan 9
  • Console bug with suppr and Autocompleter

    Console bug with suppr and Autocompleter

    When we push 2 times tab to got the following list and push "suppr" we quit the list and the cursor don't move as expected.

    bug reproduce :

    
    require 'vendor/autoload.php';
    
    
     $read = new Hoa\Console\Readline\Readline();
    
     $read->setAutocompleter(new Hoa\Console\Readline\Autocompleter\Word(
         get_defined_functions()['internal']
     ));
    
    
    
     do {
         $line = $read->readLine('> ');
         echo $line.PHP_EOL;
     } while (false !== $line && 'quit' != $line);
    
    

    We can even delete "> " with the keybord

    bug difficulty: medium 
    opened by Esysteme 9
  • Added in Shortcut Autocompleter

    Added in Shortcut Autocompleter

    Still does not work, need your input. The current implentation of _bindTab does not handle this properly.

    Currently _bindTab does not re-write anything typed by the user, only adds to it. It should be able to re-write the current word, so that this class works correctly.

    opened by mrkmg 9
  • Not installable with composer

    Not installable with composer

    $ composer require hoa/websocket:dev-master
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Installation request for hoa/websocket dev-master -> satisfiable by hoa/websocket[dev-master].
        - hoa/websocket dev-master requires hoa/core dev-master -> no matching package found.
    
    Potential causes:
     - A typo in the package name
     - The package is not available in a stable-enough version according to your minimum-stability setting
       see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
    
    Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
    
    Installation failed, reverting ./composer.json to its original content.
    
    opened by Aust1994 8
  • Autocompletion forgets counting extra spaces

    Autocompletion forgets counting extra spaces

    The autocompletion is OK while I'm typing a word. My word is completed, then I continue at the end. I always add a space if my command has some words.

    But if I typed a first word and the following space (or more) then I type "tab": my extra space is remove. If I type again on "tab" the first letter of the previous word will be duplicate.

    I guess LineLength is not updated when the autocompleter remove the ending space chars. Moreover I would like one extra space after the autocompleted word ;)

    bug difficulty: medium 
    opened by 1e1 7
  • Write tests

    Write tests

    Now we have an Output interface, this is much easier to test the Hoa\Console library. So here we go. I am writing tests :-].

    Steps

    • [x] Console,
    • [x] Cursor,
    • [x] GetOption,
    • [x] Input,
    • [x] Mouse,
    • [x] Output,
    • [x] Parser,
    • [ ] Processus,
    • [ ] Readline:
      • [ ] Readline,
      • [x] Password,
      • [x] Autocompleter:
        • [x] Path,
        • [x] Word,
        • [x] Aggregator,
    • [x] Tput,
    • [x] Window.
    enhancement difficulty: hard 
    opened by Hywan 7
  • Console and Windows

    Console and Windows

    Hi guys :-D

    I am here to explain my problem on windows with use Hoa\Console. In introduction I use two console application, the basic cmd.exe and cmder and i run same script on each console application.

    Cmd

    Cmd output

    In addition the command

    C:\www\launchee-cli>C:\cmder\php\php.exe vendor\hoa\core\Bin\hoa console:termcap --count max_color
    0
    

    Cmder

    Cmder output

    for avoid this error I need to use this code unset($_SERVER['TERM'])

    Cmder output

    In addition the command (with unset $_SERVER['term'] ofc)

    λ php vendor\hoa\core\Bin\hoa console:termcap --count max_color
    0
    

    IMHO forget console windows are not an good idea :+1: and other do this (like composer, or sf2) => and its not an troll unleashing :dancer:

    bug difficulty: medium 
    opened by thehawk970 7
  • Upgrade to GitHub-native Dependabot

    Upgrade to GitHub-native Dependabot

    Dependabot Preview will be shut down on August 3rd, 2021. In order to keep getting Dependabot updates, please merge this PR and migrate to GitHub-native Dependabot before then.

    Dependabot has been fully integrated into GitHub, so you no longer have to install and manage a separate app. This pull request migrates your configuration from Dependabot.com to a config file, using the new syntax. When merged, we'll swap out dependabot-preview (me) for a new dependabot app, and you'll be all set!

    With this change, you'll now use the Dependabot page in GitHub, rather than the Dependabot dashboard, to monitor your version updates, and you'll configure Dependabot through the new config file rather than a UI.

    If you've got any questions or feedback for us, please let us know by creating an issue in the dependabot/dependabot-core repository.

    Learn more about migrating to GitHub-native Dependabot

    Please note that regular @dependabot commands do not work on this pull request.

    dependencies 
    opened by dependabot-preview[bot] 1
  • Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files.

    As a result, Dependabot couldn't update your dependencies.

    The error Dependabot encountered was:

    Your requirements could not be resolved to an installable set of packages.
      Problem 1
        - Root composer.json requires hoa/file dev-master -> satisfiable by hoa/file[dev-master].
        - hoa/file dev-master requires hoa/iterator dev-master -> found hoa/iterator[dev-master, 2.x-dev (alias of dev-master)] but it does not match your minimum-stability.
      Problem 2
        - Root composer.json requires hoa/test dev-master -> satisfiable by hoa/test[dev-master].
        - hoa/test dev-master requires hoa/cli dev-master -> found hoa/cli[dev-master, 3.x-dev (alias of dev-master)] but it does not match your minimum-stability.
    

    If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

    View the update logs.

    opened by dependabot-preview[bot] 0
  • Add support for EXTENDED NUMBER FORMAT

    Add support for EXTENDED NUMBER FORMAT

    Fixes parsing terminfo databases in extended number format, where numbers and string capabilities are wrong. According to man term(5), if the magic number is 542 (octal 01036), numbers are signed 32-bit integers instead of signed 16-bit integers.

    opened by ntoniazzi 0
  • Setting the cursor position doesn't change anything

    Setting the cursor position doesn't change anything

    Hi. My os is Lubuntu.

    Setting the cursor position doesn't change anything, echo is still printed, in a continuous stream where anything printed is printed following each other.

    Hoa\Console\Cursor::moveTo(0, 0);
    echo "hi" ;
    Hoa\Console\Cursor::moveTo(10,10);
    echo "ho" ;
    Hoa\Console\Cursor::moveTo(20, 20);
    echo "hu" ;
    

    will echo : hihohu

    I would be happy to help debugging.

    opened by EmmanuelCervettiIESSUD 0
  • Feature request: Console sections

    Feature request: Console sections

    So Symfony console got great feature last year https://symfony.com/blog/new-in-symfony-4-1-advanced-console-output

    It allows things like showing multiple progress bars at the same time. I thought you might be interested to implement this as well, seeing your lib also seems very advanced.

    enhancement question difficulty: unspecified 
    opened by ostrolucky 0
Releases(3.17.05.02)
  • 3.17.05.02(May 2, 2017)

    • Tput: Deterministic order for name and desc…. (Ivan Enderlin, 2017-03-08T09:26:31+01:00)
    • CI: Set up Travis. (Ivan Enderlin, 2017-03-08T08:58:58+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 3.17.01.11(Jan 11, 2017)

  • 3.16.11.08(Nov 8, 2016)

    • Documentation: Add the “Learn more” link. (Ivan Enderlin, 2016-10-14T23:40:05+02:00)
    • Documentation: New README.md file. (Ivan Enderlin, 2016-10-14T23:29:22+02:00)
    • Documentation: Fix docs and source links. (Ivan Enderlin, 2016-10-05T20:28:46+02:00)
    • Documentation: Update support properties. (Ivan Enderlin, 2016-10-05T20:12:17+02:00)
    • Documentation: Use TLS on central.hoa. (Ivan Enderlin, 2016-09-09T14:59:03+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 3.16.09.06(Sep 6, 2016)

    • Documentation: Fix API documentation. (Alexis von Glasow, 2016-07-11T00:01:57+02:00)
    • Quality: Fix example CS in the README.md. (Ivan Enderlin, 2016-07-01T16:37:50+02:00)
    • Autocompleter: Force to work on a sub-line. (Ivan Enderlin, 2016-05-22T15:46:58+02:00)
    • Quality: Fix methods ordering. (Ivan Enderlin, 2016-02-24T07:28:41+01:00)
    • Implement Hoa\Console\Output::getStream which is now required by Hoa\Stream\IStream\Out. (Metalaka, 2015-11-01T20:15:43+01:00)
    • Fix phpDoc. (Metalaka, 2015-11-01T20:13:12+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 3.16.01.14(Jan 14, 2016)

  • 3.16.01.11(Jan 11, 2016)

    • Quality: Drop PHP5.4. (Ivan Enderlin, 2016-01-11T09:15:26+01:00)
    • Quality: Run devtools:cs. (Ivan Enderlin, 2016-01-09T08:59:18+01:00)
    • Core: Remove Hoa\Core. (Ivan Enderlin, 2016-01-09T08:08:44+01:00)
    • Consistency: Update registerShutdownFunction. (Ivan Enderlin, 2015-12-09T06:58:00+01:00)
    • Consistency: Remove from calls. (Ivan Enderlin, 2015-12-09T06:35:35+01:00)
    • Consistency: Update registerShutdownFunction. (Ivan Enderlin, 2015-12-08T23:41:11+01:00)
    • Event: Remove event calls. (Ivan Enderlin, 2015-12-08T22:48:06+01:00)
    • Consistency: Use Hoa\Consistency. (Ivan Enderlin, 2015-12-08T11:01:36+01:00)
    • Event: Use Hoa\Event. (Ivan Enderlin, 2015-11-23T21:48:33+01:00)
    • Exception: Use Hoa\Exception. (Ivan Enderlin, 2015-11-20T07:17:38+01:00)
    • Test: Add specificity for Windows. (Ivan Enderlin, 2015-11-10T13:29:22+01:00)
    • Test: Write test suite for …completer\Aggregate. (Ivan Enderlin, 2015-11-10T08:45:10+01:00)
    • Test: Write test suite for …e\Readline\Password. (Ivan Enderlin, 2015-10-29T23:00:01+01:00)
    • Test: Use beforeTestMethod instead of setUp. (Ivan Enderlin, 2015-10-29T13:41:12+01:00)
    • Terminfo: Add the xterm-256color database. (Ivan Enderlin, 2015-10-29T13:40:30+01:00)
    • Test: Write test suite for …Autocompleter\Path. (Ivan Enderlin, 2015-10-29T08:46:04+01:00)
    • Test: Write test suite for …Autocompleter\Word. (Ivan Enderlin, 2015-10-29T08:10:47+01:00)
    • Readline: Use Console::getInput. (Ivan Enderlin, 2015-10-29T07:38:13+01:00)
    • Test: Write test suite for Hoa\Console\GetOption. (Ivan Enderlin, 2015-10-29T07:37:57+01:00)
    • GetOption: Reset the $optionValue all the time. (Ivan Enderlin, 2015-10-29T07:37:37+01:00)
    • CS: Clean namespaces and fix some styles. (Ivan Enderlin, 2015-10-28T07:56:40+01:00)
    • Test: Write test suite for Hoa\Console\Mouse. (Ivan Enderlin, 2015-10-28T07:54:38+01:00)
    • Mouse: Untrack when tracking fails. (Ivan Enderlin, 2015-10-28T07:52:48+01:00)
    • Mouse: New constants representing pointer codes. (Ivan Enderlin, 2015-10-28T07:50:50+01:00)
    • Test: Write test suite for Hoa\Console\Window. (Ivan Enderlin, 2015-10-27T10:12:44+01:00)
    • Window: The constructor must be private. (Ivan Enderlin, 2015-10-27T09:32:54+01:00)
    • Test: Write test suite for Hoa\Console\Cursor. (Ivan Enderlin, 2015-10-26T13:37:53+01:00)
    • Test: Write test suite for Hoa\Console\Tput. (Ivan Enderlin, 2015-10-26T13:37:33+01:00)
    • Test: Write test suite for Hoa\Console\Parser. (Ivan Enderlin, 2015-10-26T13:37:13+01:00)
    • Test: Write test suite for Hoa\Console. (Ivan Enderlin, 2015-10-26T13:36:42+01:00)
    • Console: Add the setTput static method. (Ivan Enderlin, 2015-10-26T13:34:37+01:00)
    • Console: Ensure STDIN is defined before using it. (Ivan Enderlin, 2015-10-26T13:34:02+01:00)
    • Tput: If no terminfo found, fallback to xterm. (Ivan Enderlin, 2015-10-28T14:07:18+01:00)
    • Tput: Check that TERM is set and not empty. (Ivan Enderlin, 2015-10-28T14:06:36+01:00)
    • Update API documentation. (Ivan Enderlin, 2015-10-26T08:39:15+01:00)
    • Console: Solve stty -f vs. stty -F issue. (Ivan Enderlin, 2015-10-22T09:29:42+02:00)
    • Input: Add the getStream method. (Ivan Enderlin, 2015-10-22T08:34:02+02:00)
    • Test the Input class. (Ivan Enderlin, 2015-10-21T17:04:52+02:00)
    • Create the Input interface. (Ivan Enderlin, 2015-09-24T07:44:50+02:00)
    • stty uses /dev/tty instead of the std. input. (Ivan Enderlin, 2015-09-24T07:16:48+02:00)
    • Advanced interaction can be forced. (Ivan Enderlin, 2015-09-24T07:15:26+02:00)
    • Fix, doc. (Metalaka, 2015-10-20T21:58:00+02:00)
    • Improve Output behavior. (Metalaka, 2015-10-20T13:24:48+02:00)
    • Test the Output classes. (Ivan Enderlin, 2015-10-14T16:49:53+02:00)
    • Arrays are “var exported” on the output. (Ivan Enderlin, 2015-10-14T07:54:29+02:00)
    • Window uses Output & multiplexer support. (Ivan Enderlin, 2015-10-14T07:41:33+02:00)
    • Consider multiplexer while writing on the output. (Ivan Enderlin, 2015-10-14T07:37:29+02:00)
    • Use Hoa\Console::getOutput when possible. (Ivan Enderlin, 2015-09-30T17:23:28+02:00)
    • Introduce the Output object. (Ivan Enderlin, 2015-09-30T16:53:13+02:00)
    • Format API documentation. (Ivan Enderlin, 2015-09-30T16:53:08+02:00)
    • Update API documentation. (Ivan Enderlin, 2015-09-30T16:48:30+02:00)
    • Add TMUX(1) support for Window::copy. (Ivan Enderlin, 2015-09-30T09:36:38+02:00)
    • Add the Console::isTmuxRunning method. (Ivan Enderlin, 2015-09-30T09:29:16+02:00)
    • Add a .gitignore file. (Stéphane HULARD, 2015-08-03T11:23:22+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.15.07.27(Jul 27, 2015)

    • Bip when an “invalid” character is pressed. (Ivan Enderlin, 2015-07-27T08:30:51+02:00)
    • Print character only if printable. (Ivan Enderlin, 2015-07-27T08:23:01+02:00)
    • Optimize the _readline control flow graph. (Ivan Enderlin, 2015-07-27T08:20:50+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.15.07.23(Jul 23, 2015)

    • More detailed API documentation. (Ivan Enderlin, 2015-07-16T08:12:43+02:00)
    • Update the API documentation. (Ivan Enderlin, 2015-07-16T07:47:55+02:00)
    • Fix phpDoc. (Metalaka, 2015-07-15T18:01:57+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.15.05.29(May 29, 2015)

  • 2.15.03.19(Mar 19, 2015)

  • 2.15.03.06(Mar 6, 2015)

  • 2.15.02.18(Feb 18, 2015)

    • Add the CHANGELOG.md file. (Ivan Enderlin, 2015-02-18T08:59:24+01:00)
    • Use Hoa\Dispatcher\ClassMethod dispatcher in the documentation. (Ivan Enderlin, 2015-02-11T10:49:19+01:00)
    • Fix a CS. (Ivan Enderlin, 2015-02-10T17:03:09+01:00)
    • Fix links in the documentation. (Ivan Enderlin, 2015-01-23T19:23:57+01:00)
    • Happy new year! (Ivan Enderlin, 2015-01-05T14:21:41+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.15.01.04(Feb 18, 2015)

    • Inverse $x and $y in Cursor::moveTo. (Ivan Enderlin, 2015-01-04T15:10:08+01:00)
    • Allows to specify the term in Tput::getTerminfo. (Ivan Enderlin, 2015-01-04T15:08:59+01:00)
    • Remove from/import and update to PHP5.4. (Ivan Enderlin, 2015-01-04T15:03:40+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.14.12.10(Feb 18, 2015)

  • 2.14.11.26(Feb 18, 2015)

    • Format the composer.json file. (Ivan Enderlin, 2014-11-25T14:15:31+01:00)
    • Require hoa/test. (Alexis von Glasow, 2014-11-25T13:49:37+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.14.11.09(Feb 18, 2015)

  • 2.14.09.23(Feb 18, 2015)

  • 2.14.09.17(Feb 18, 2015)

Owner
Hoa
Hoa is a modular, extensible and structured set of PHP libraries.
Hoa
The Hoa\Console library.

Hoa is a modular, extensible and structured set of PHP libraries. Moreover, Hoa aims at being a bridge between industrial and research worlds. Hoa\Con

Hoa 366 Dec 14, 2022
A PHP library for command-line argument processing

GetOpt.PHP GetOpt.PHP is a library for command-line argument processing. It supports PHP version 5.4 and above. Releases For an overview of the releas

null 324 Dec 8, 2022
An object-oriented option parser library for PHP, which supports type constraints, flag, multiple flag, multiple values, required value checking

GetOptionKit Code Quality Versions & Stats A powerful option parser toolkit for PHP, supporting type constraints, flag, multiple flag, multiple values

Yo-An Lin 140 Sep 28, 2022
Library for creating CLI commands or applications

Console Motivation: this library purpose is to provide a lighter and more robust API for console commands and/or applications to symfony/console. It c

Théo FIDRY 16 Dec 28, 2022
Generic PHP command line flags parse library

PHP Flag Generic PHP command line flags parse library Features Generic CLI options and arguments parser. Support set value data type(int,string,bool,a

PHP Toolkit 23 Nov 13, 2022
Simple but yet powerful library for running almost all artisan commands.

:artisan gui Simple but yet powerful library for running some artisan commands. Requirements Laravel 8.* php ^7.3 Installation Just install package: c

null 324 Dec 28, 2022
PHP library for executing commands on multiple remote machines, via SSH

#Shunt Inspired by Ruby's Capistrano, Shunt is PHP library for executing commands on multiple remote machines, via SSH. Specifically, this library was

The League of Extraordinary Packages 436 Feb 20, 2022
A PHP library for command-line argument processing

GetOpt.PHP GetOpt.PHP is a library for command-line argument processing. It supports PHP version 7.1 and above. Releases For an overview of the releas

null 324 Dec 8, 2022
BetterWPCLI - a small, zero-dependencies, PHP library that helps you build enterprise WordPress command-line applications.

BetterWPCLI - a small, zero-dependencies, PHP library that helps you build enterprise WordPress command-line applications.

Snicco 5 Oct 7, 2022
Image optimization / compression library. This library is able to optimize png, jpg and gif files in very easy and handy way. It uses optipng, pngquant, pngcrush, pngout, gifsicle, jpegoptim and jpegtran tools.

Image Optimizer This library is handy and very easy to use optimizer for image files. It uses optipng, pngquant, jpegoptim, svgo and few more librarie

Piotr Śliwa 879 Dec 30, 2022
PHP Exif Library - library for reading and writing Exif headers in JPEG and TIFF files using PHP.

PEL: PHP Exif Library README file for PEL: PHP Exif Library. A library with support for reading and writing Exif headers in JPEG and TIFF images using

null 264 Dec 4, 2022
BeckhoffPLCSoapClient - SoapClient to communicate with BeckHoff PLC. Library made in PHP based on TcAdsWebService JavaScript Library.

BeckhoffPLCSoapClient - SoapClient to communicate with BeckHoff PLC. Library made in PHP based on TcAdsWebService JavaScript Library.

null 3 May 18, 2022
EmailReplyParser is a PHP library for parsing plain text email content, based on GitHub's email_reply_parser library written in Ruby

EmailReplyParser EmailReplyParser is a PHP library for parsing plain text email content, based on GitHub's email_reply_parser library written in Ruby.

William Durand 606 Dec 8, 2022
Library JGU is a website created for a university library system information. Made with PHP & TailwindCSS.

Library JGU Library JGU is a website created for a university library system information. Made with PHP & TailwindCSS. Key Features • How To Use • Rel

Azkazikna Ageung Laksana 23 Oct 7, 2022
This library extends the 'League OAuth2 Client' library to provide OpenID Connect Discovery support for supporting providers that expose a .well-known configuration endpoint.

OpenID Connect Discovery support for League - OAuth 2.0 Client This library extends the League OAuth2 Client library to provide OpenID Connect Discove

null 3 Jan 8, 2022
Laravel-Library-Management-system is nice to management library system...

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Eng Hasan Hajjar 2 Sep 30, 2022
Dobren Dragojević 6 Jun 11, 2023
Simple utility and class library for generating php classes from a wsdl file.

wsdl2phpgenerator Simple WSDL to PHP classes converter. Takes a WSDL file and outputs class files ready to use. Uses the MIT license. Announcement: We

null 802 Dec 10, 2022
A PHP library to support implementing representations for HATEOAS REST web services.

Hateoas A PHP library to support implementing representations for HATEOAS REST web services. Installation Working With Symfony Usage Introduction Conf

William Durand 998 Dec 5, 2022