mileschou / pherm
A command line terminal utility in PHP
v0.6.0
2019-12-14 07:03 UTC
Requires
- php: >=7.2
- ext-posix: *
- psr/container: ^1.0
Requires (Dev)
- amphp/amp: ^2.4
- codacy/coverage: ^1.4
- illuminate/container: ^6
- mockery/mockery: ^1.3
- phpstan/phpstan: ^0.11.19
- phpunit/phpunit: ^8.4
- psy/psysh: ^0.9.9
- squizlabs/php_codesniffer: ^3.5
README
This repo is fork from
php-school/terminal
Small utility to help provide a simple, consist API for terminal interaction.
See examples to know how to use.
Usage
Hello world example:
$container = new Container(); $container->instance(Input::class, new InputStream()); $container->instance(Output::class, new OutputStream()); $terminal = (new Terminal($container)) ->enableInstantOutput() ->bootstrap(); $terminal->clear(); $str = 'Hello world!'; $terminal->cursor()->center(-(mb_strlen($str) / 2))->write($str); $terminal->cursor()->bottom();
Credits
License
The MIT License (MIT). Please see License File for more information.