\Inhere\Console\Component\FormatterTable

Class Table - Tabular data display

Summary

Methods
Properties
Constants
show()
$data
$columns
$body
$title
$titleBorder
$titleStyle
$titleAlign
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$data

$data : array

Type

array

$columns

$columns : array

Type

array

$body

$body : string|array

Type

string|array

$title

$title : string

Type

string

$titleBorder

$titleBorder : string

Type

string

$titleStyle

$titleStyle : string

Type

string

$titleAlign

$titleAlign : string

Type

string

Methods

show()

show(array  $data, string  $title = 'Data Table', array  $opts = array()) : integer

Tabular data display

Parameters

array $data
string $title
array $opts

Returns

integer

Examples

// like from database query's data. $data = [ [ col1 => value1, col2 => value2, col3 => value3, ... ], // first row [ col1 => value4, col2 => value5, col3 => value6, ... ], // second row ... ... ]; Show::table($data, 'a table'); // use custom head $data = [ [ value1, value2, value3, ... ], // first row [ value4, value5, value6, ... ], // second row ... ... ]; $opts = [ 'showBorder' => true, 'columns' => [col1, col2, col3, ...] ]; Show::table($data, 'a table', $opts); ```
** File not found : ```php **