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.
composer require vpa/frames-console
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);