Свойство | Тип | Описание | |
---|---|---|---|
$headersCopy | |||
$maxTableWidth | integer | ||
$minColumnWidth | integer | ||
$outputCopy | |||
$rowsCopy | parent Table class. |
Метод | Описание | |
---|---|---|
__construct ( Symfony\Component\Console\Output\OutputInterface $output, integer | null $maxTableWidth = null, integer | null $minColumnWidth = 10 ) | AdaptiveTable constructor. | |
addRow ( $row ) | ||
render ( ) | ||
setHeaders ( array $headers ) |
Метод | Описание | |
---|---|---|
adaptCells ( array $rows, array $maxColumnWidths ) : array | Modify table rows, wrapping their cells' content to the max column width. | |
adaptRows ( ) | Adapt rows based on the terminal width. | |
getMaxColumnWidths ( ) : array | ||
getMaxContentWidth ( integer $columnCount ) : integer | Find the maximum content width (excluding decoration) for each table row. | |
getTerminalWidth ( integer $default = 120 ) : integer | ||
wrapCell ( string $contents, integer $width ) : string | Word-wrap the contents of a cell, so that they fit inside a max width. |
Метод | Описание | |
---|---|---|
getCellWidth ( string | Symfony\Component\Console\Helper\TableCell $cell ) : float | integer | Get the default width of a table cell (the length of its longest line). |
public addRow ( $row ) |
protected getMaxColumnWidths ( ) : array | ||
Результат | array | An array of the maximum column widths that fit into the table width, keyed by the column number. |
protected getMaxContentWidth ( integer $columnCount ) : integer | ||
$columnCount | integer | The number of columns in the table. |
Результат | integer | The maximum table width, minus the width taken up by decoration. |
protected getTerminalWidth ( integer $default = 120 ) : integer | ||
$default | integer | |
Результат | integer |
public render ( ) |
public setHeaders ( array $headers ) | ||
$headers | array |