rewrite TablePrinter

This commit is contained in:
crazywhalecc
2022-05-13 02:58:20 +08:00
parent 06b76e4c96
commit 94ed3b9a49
4 changed files with 229 additions and 54 deletions

View File

@@ -0,0 +1,19 @@
<?php
declare(strict_types=1);
require __DIR__ . '/../vendor/autoload.php';
$data = [
'path' => '我是一端比较牛逼的终端打印工具',
'php_version' => PHP_VERSION,
'php_version_id' => PHP_VERSION_ID,
'info' => '并且支持中文!!',
'path2' => __DIR__,
'long' => '我可以' . str_repeat('很长', 50),
];
(new \ZM\Logger\TablePrinter($data))
->setValueColor('random')
->setRowOverflowHide()
->printAll();