-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving docs to another repository, updated minicli to 2.0
- Loading branch information
erika
committed
May 25, 2020
1 parent
8befe9a
commit 9fb3b07
Showing
9 changed files
with
29 additions
and
385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace App\Command\Help; | ||
|
||
use Minicli\Command\CommandController; | ||
use Minicli\Output\Filter\ColorOutputFilter; | ||
use Minicli\Output\Helper\TableHelper; | ||
|
||
class TableController extends CommandController | ||
{ | ||
public function handle() | ||
{ | ||
$this->getPrinter()->display('Testing Tables'); | ||
|
||
$table = new TableHelper(); | ||
$table->addHeader(['Header 1', 'Header 2', 'Header 3']); | ||
|
||
for($i = 1; $i <= 10; $i++) { | ||
$table->addRow([$i, rand(0, 10), "other string $i"]); | ||
} | ||
|
||
$this->getPrinter()->newline(); | ||
$this->getPrinter()->rawOutput($table->getFormattedTable(new ColorOutputFilter())); | ||
$this->getPrinter()->newline(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.