프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 |