vpa / frames-console
Beauty frames for text objects in CLI console
v0.4.0
2022-09-10 22:59 UTC
Requires
- php: >=8.0
- vpa/di: ^0.2.0
Requires (Dev)
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.7
- vimeo/psalm: ^4.8
README
Frames-console
A flexible set of components that allow you to frame various content in the console. Supports the display of text, block elements and tables, including nested ones.
Install
composer require vpa/frames-console
Get Started
If you want to display multiple elements - we recommend using the Page root element. You can initialize the first element yourself:
use VPA\Console\Shell;
use VPA\Console\FrameConsoleConfig;
use VPA\Console\Glyphs\Page;
require_once(__DIR__ . '/../vendor/autoload.php');
$shell = new Shell();
$config = new FrameConsoleConfig($shell);
$page = new Page($config);
or use DI Container:
use VPA\DI\Container;
use VPA\Console\FrameConsoleConfig;
use VPA\Console\Glyphs\Page;
require_once(__DIR__ . '/../vendor/autoload.php');
$di = new Container();
$di->registerContainers([
'VPA\Console\FrameConfigInterface' => FrameConsoleConfig::class,
]);
$page = $di->get(Page::class);