Helper\TableHelper (Component\Console)
Symfony\Component\Console\Helper\TableHelper
class TableHelper extends Helper
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 |
__construct($triggerDeprecationError = true) | ||
TableHelper | setLayout(int $layout) Sets table layout type. | |
setHeaders(array $headers) | ||
setRows(array $rows) | ||
addRows(array $rows) | ||
addRow(array $row) | ||
setRow($column, array $row) | ||
TableHelper | setPaddingChar(string $paddingChar) Sets padding character, used for cell padding. | |
TableHelper | setHorizontalBorderChar(string $horizontalBorderChar) Sets horizontal border character. | |
TableHelper | setVerticalBorderChar(string $verticalBorderChar) Sets vertical border character. | |
TableHelper | setCrossingChar(string $crossingChar) Sets crossing character. | |
TableHelper | setCellHeaderFormat(string $cellHeaderFormat) Sets header cell format. | |
TableHelper | setCellRowFormat(string $cellRowFormat) Sets row cell format. | |
TableHelper | setCellRowContentFormat(string $cellRowContentFormat) Sets row cell content format. | |
TableHelper | setBorderFormat(string $borderFormat) Sets table border format. | |
TableHelper | setPadType(int $padType) Sets cell padding type. | |
render(OutputInterface $output) Renders table to output. | ||
string | getName() Returns the canonical name of this helper. |
Details
public setHelperSet(HelperSet $helperSet = null)
Sets the helper set associated with this helper.
public HelperSet getHelperSet()
Gets the helper set associated with this helper.
static public int strlen(string $string)
Returns the length of a string, using mb_strwidth if it is available.
static public formatTime($secs)
static public formatMemory($memory)
static public strlenWithoutDecoration(OutputFormatterInterface $formatter, $string)
public __construct($triggerDeprecationError = true)
public TableHelper setLayout(int $layout)
Sets table layout type.
public setHeaders(array $headers)
public setRows(array $rows)
public addRows(array $rows)
public addRow(array $row)
public setRow($column, array $row)
public TableHelper setPaddingChar(string $paddingChar)
Sets padding character, used for cell padding.
public TableHelper setHorizontalBorderChar(string $horizontalBorderChar)
Sets horizontal border character.
public TableHelper setVerticalBorderChar(string $verticalBorderChar)
Sets vertical border character.
public TableHelper setCrossingChar(string $crossingChar)
Sets crossing character.
public TableHelper setCellHeaderFormat(string $cellHeaderFormat)
Sets header cell format.
public TableHelper setCellRowFormat(string $cellRowFormat)
Sets row cell format.
public TableHelper setCellRowContentFormat(string $cellRowContentFormat)
Sets row cell content format.
public TableHelper setBorderFormat(string $borderFormat)
Sets table border format.
public TableHelper setPadType(int $padType)
Sets cell padding type.
public 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 | +---------------+-----------------------+------------------+
public string getName()
Returns the canonical name of this helper.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Console/Helper/TableHelper.html