基础代码
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Command Line Tools
|
||||
*
|
||||
* This source file is subject to the MIT license that is bundled
|
||||
* with this package in the file LICENSE.
|
||||
*
|
||||
* @author James Logsdon <dwarf@girsbrain.org>
|
||||
* @copyright 2010 James Logsdom (http://girsbrain.org)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
|
||||
namespace cli\table;
|
||||
|
||||
/**
|
||||
* The tabular renderer is used for displaying data in a tabular format.
|
||||
*/
|
||||
class Tabular extends Renderer {
|
||||
/**
|
||||
* Renders a row for output.
|
||||
*
|
||||
* @param array $row The table row.
|
||||
* @return string The formatted table row.
|
||||
*/
|
||||
public function row(array $row) {
|
||||
return implode("\t", array_values($row));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user