Class TableFormatter
Class TableFormatter
Output text in multiple columns
- splitbrain\phpcli\TableFormatter
- Extended by splitbrain\phpcli\tests\TableFormatter
Namespace: splitbrain\phpcli\tests
License: MIT
Author: Andreas Gohr andi@splitbrain.org
Located at tests/TableFormatterTest.php
Methods summary
License: MIT
Author: Andreas Gohr andi@splitbrain.org
Located at tests/TableFormatterTest.php
public
int[]
#
calculateColLengths( array $columns )
Takes an array with dynamic column width and calculates the correct width
Takes an array with dynamic column width and calculates the correct width
Column width can be given as fixed char widths, percentages and a single * width can be given for taking the remaining available space. When mixing percentages and fixed widths, percentages refer to the remaining space after allocating the fixed width
Parameters
- $columns
Returns
int[]
Throws
Exception
Overrides
public
integer
public
string
__construct(),
format(),
getBorder(),
getMaxWidth(),
getTerminalWidth(),
pad(),
setBorder(),
setMaxWidth(),
substr()