Changeset View
Changeset View
Standalone View
Standalone View
src/console/view/PhutilConsoleTable.php
<?php | <?php | ||||
/** | /** | ||||
* Show a table in the console. Usage: | * Show a table in the console. Usage: | ||||
* | * | ||||
* $table = id(new PhutilConsoleTable()) | * $table = (new PhutilConsoleTable()) | ||||
* ->addColumn('id', array('title' => 'ID', 'align' => 'right')) | * ->addColumn('id', array('title' => 'ID', 'align' => 'right')) | ||||
* ->addColumn('name', array('title' => 'Username', 'align' => 'center')) | * ->addColumn('name', array('title' => 'Username', 'align' => 'center')) | ||||
* ->addColumn('email', array('title' => 'Email Address')) | * ->addColumn('email', array('title' => 'Email Address')) | ||||
* | * | ||||
* ->addRow(array( | * ->addRow(array( | ||||
* 'id' => 12345, | * 'id' => 12345, | ||||
* 'name' => 'alicoln', | * 'name' => 'alicoln', | ||||
* 'email' => 'abraham@lincoln.com', | * 'email' => 'abraham@lincoln.com', | ||||
▲ Show 20 Lines • Show All 292 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0