PHP-Console-Color
PHP-Console-Color copied to clipboard
Documentation does not say what this package does
I inherited this package as part of an existing project that was started in Laravel 5.3. We're reviewing packages, and I discovered that no documentation I can find explains what this package does. I checked Packagist.org, and this git repo. It'd be nice to understand a bit about why this package is useful.
Thank you.
Yes. I also have the same issue here. There is no official doc to know how to use this package.
I am not good documentation guy, so at least I added image and link to example.php
file. But pull requests are welcome!
Hi @JakubOnderka, thank you for your reply. Do you mind I add some docs for improving example.php
?
I plan to create the official doc like that. Thanks.
Well, I saw the state of this project two days ago, and, well, I think the interface for this library could use some MAJOR refactoring. A total rewrite, actually. So that's what I did!
https://github.com/phpexpertsinc/ConsolePainter
Its fluent interface lets you effortlessly create complex console formatting:
// This is *REALLY* emphasized!
echo $p->italics('This is ') .
$p->bold('*') . $p->bold()->underlined()->yellow('*REALLY*') .
$p->bold()->onLightBlue(' emphasized*') . '!' . "\n";
echo $p->yellow('Press ')->bolder()->red('ENTER')->yellow(' to continue...') . "\n";
// Draw the Red, White and Blue:
echo $p->bolder()->red('Red')->dim(', ')->italics()->white('White ')->dim('and ')->blue('Blue') . "\n";
You can even create ASCII art, like this derivation of the EU logo: