TableHelper deprecated
class TableHelper extends Helper
deprecated
since | version 2.5, to be removed in 3.0 Use {@link Table} instead. |
Provides helpers to display table output.
Constants
LAYOUT_DEFAULT | |
LAYOUT_BORDERLESS | |
LAYOUT_COMPACT | |
Methods
Details
setHelperSet(HelperSet $helperSet = null)
Sets the helper set associated with this helper.
Parameters
Gets the helper set associated with this helper.
Return Value
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 |
Parameters
Parameters
static
strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)
Parameters
__construct($triggerDeprecationError = true)
Parameters
TableHelper
setLayout(int $layout)
Sets table layout type.
Parameters
int | $layout | self::LAYOUT_* |
Return Value
Exceptions
Parameters
setRows(array $rows)
Parameters
addRows(array $rows)
Parameters
addRow(array $row)
Parameters
setRow($column, array $row)
Parameters
TableHelper
setPaddingChar(string $paddingChar)
Sets padding character, used for cell padding.
Parameters
Return Value
TableHelper
setHorizontalBorderChar(string $horizontalBorderChar)
Sets horizontal border character.
Parameters
string | $horizontalBorderChar | |
Return Value
TableHelper
setVerticalBorderChar(string $verticalBorderChar)
Sets vertical border character.
Parameters
string | $verticalBorderChar | |
Return Value
TableHelper
setCrossingChar(string $crossingChar)
Sets crossing character.
Parameters
Return Value
Sets header cell format.
Parameters
Return Value
Sets row cell format.
Parameters
Return Value
TableHelper
setCellRowContentFormat(string $cellRowContentFormat)
Sets row cell content format.
Parameters
string | $cellRowContentFormat | |
Return Value
Sets table border format.
Parameters
Return Value
TableHelper
setPadType(int $padType)
Sets cell padding type.
Parameters
Return Value
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
string
getName()
Returns the canonical name of this helper.
Return Value
string | The canonical name |