TableHelper deprecated
class TableHelper extends Helper
deprecated
Provides helpers to display table output.
Constants
| LAYOUT_DEFAULT | |
| LAYOUT_BORDERLESS | |
| LAYOUT_COMPACT | 
Methods
| setHelperSet(HelperSet $helperSet = null) Sets the helper set associated with this helper. | from Helper | |
| HelperSet | getHelperSet() Gets the helper set associated with this helper. | from Helper | 
| static int | strlen(string $string) Returns the length of a string, using mb_strwidth if it is available. | from Helper | 
| static | formatTime($secs) | from Helper | 
| static | formatMemory($memory) | from Helper | 
| static | strlenWithoutDecoration(OutputFormatterInterface $formatter, $string) | from Helper | 
| static | removeDecoration(OutputFormatterInterface $formatter, $string) | from Helper | 
| __construct($triggerDeprecationError = true) | ||
| $this | setLayout(int $layout) Sets table layout type. | |
| setHeaders(array $headers) | ||
| setRows(array $rows) | ||
| addRows(array $rows) | ||
| addRow(array $row) | ||
| setRow($column, array $row) | ||
| $this | setPaddingChar(string $paddingChar) Sets padding character, used for cell padding. | |
| $this | setHorizontalBorderChar(string $horizontalBorderChar) Sets horizontal border character. | |
| $this | setVerticalBorderChar(string $verticalBorderChar) Sets vertical border character. | |
| $this | setCrossingChar(string $crossingChar) Sets crossing character. | |
| $this | setCellHeaderFormat(string $cellHeaderFormat) Sets header cell format. | |
| $this | setCellRowFormat(string $cellRowFormat) Sets row cell format. | |
| $this | setCellRowContentFormat(string $cellRowContentFormat) Sets row cell content format. | |
| $this | setBorderFormat(string $borderFormat) Sets table border format. | |
| $this | setPadType(int $padType) Sets cell padding type. | |
| render(OutputInterface $output) Renders table to output. | ||
| string | getName() Returns the canonical name of this helper. | 
Details
setHelperSet(HelperSet $helperSet = null)
Sets the helper set associated with this helper.
Parameters
| HelperSet | $helperSet | 
HelperSet getHelperSet()
Gets the helper set associated with this helper.
Return Value
| HelperSet | A HelperSet instance | 
static int strlen(string $string)
Returns the length of a string, using mb_strwidth if it is available.
Parameters
| string | $string | The string to check its length | 
Return Value
| int | The length of the string | 
static formatTime($secs)
Parameters
| $secs | 
static formatMemory($memory)
Parameters
| $memory | 
static strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)
Parameters
| OutputFormatterInterface | $formatter | |
| $string | 
static removeDecoration(OutputFormatterInterface $formatter, $string)
Parameters
| OutputFormatterInterface | $formatter | |
| $string | 
__construct($triggerDeprecationError = true)
Parameters
| $triggerDeprecationError | 
$this setLayout(int $layout)
Sets table layout type.
Parameters
| int | $layout | self::LAYOUT_* | 
Return Value
| $this | 
Exceptions
| InvalidArgumentException | when the table layout is not known | 
setHeaders(array $headers)
Parameters
| array | $headers | 
setRows(array $rows)
Parameters
| array | $rows | 
addRows(array $rows)
Parameters
| array | $rows | 
addRow(array $row)
Parameters
| array | $row | 
setRow($column, array $row)
Parameters
| $column | ||
| array | $row | 
$this setPaddingChar(string $paddingChar)
Sets padding character, used for cell padding.
Parameters
| string | $paddingChar | 
Return Value
| $this | 
$this setHorizontalBorderChar(string $horizontalBorderChar)
Sets horizontal border character.
Parameters
| string | $horizontalBorderChar | 
Return Value
| $this | 
$this setVerticalBorderChar(string $verticalBorderChar)
Sets vertical border character.
Parameters
| string | $verticalBorderChar | 
Return Value
| $this | 
$this setCrossingChar(string $crossingChar)
Sets crossing character.
Parameters
| string | $crossingChar | 
Return Value
| $this | 
$this setCellHeaderFormat(string $cellHeaderFormat)
Sets header cell format.
Parameters
| string | $cellHeaderFormat | 
Return Value
| $this | 
$this setCellRowFormat(string $cellRowFormat)
Sets row cell format.
Parameters
| string | $cellRowFormat | 
Return Value
| $this | 
$this setCellRowContentFormat(string $cellRowContentFormat)
Sets row cell content format.
Parameters
| string | $cellRowContentFormat | 
Return Value
| $this | 
$this setBorderFormat(string $borderFormat)
Sets table border format.
Parameters
| string | $borderFormat | 
Return Value
| $this | 
$this setPadType(int $padType)
Sets cell padding type.
Parameters
| int | $padType | STRPAD* | 
Return Value
| $this | 
render(OutputInterface $output)
Renders table to output.
Example: +---------------+-----------------------+------------------+ | ISBN | Title | Author | +---------------+-----------------------+------------------+ | 99921-58-10-7 | Divine Comedy | Dante Alighieri | | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | +---------------+-----------------------+------------------+
Parameters
| OutputInterface | $output | 
string getName()
Returns the canonical name of this helper.
Return Value
| string | The canonical name | 
    © 2004–2017 Fabien Potencier
Licensed under the MIT License.
    http://api.symfony.com/2.7/Symfony/Component/Console/Helper/TableHelper.html