메소드 | 설명 | |
---|---|---|
addCell ( string $cell ) | Adds a cell to the wrapper. | |
addCells ( array $cells ) | Adds cells to the wrapper. | |
fit ( integer $maxTotalWidth, integer $nbColumns, Webmozart\Console\Api\Formatter\Formatter $formatter ) | Fits the added cells into the given maximum total width with the given number of columns. | |
getCells ( ) : string[] | Returns the data cells in the wrapper. | |
getColumnLengths ( ) : int[] | Returns the lengths of the wrapped columns. | |
getEstimatedNbColumns ( integer $maxTotalWidth ) : integer | Returns an estimated number of columns for the given maximum width. | |
getMaxTotalWidth ( ) : integer | Returns the maximum allowed total width of the columns. | |
getNbColumns ( ) : integer | Returns the number of wrapped columns. | |
getTotalWidth ( ) : integer | Returns the actual total column width. | |
getWrappedRows ( ) : string[][] | Returns the wrapped cells organized by rows and columns. | |
hasWordCuts ( ) : boolean | Returns whether any of the cells contains words cut in two. | |
hasWordWraps ( ) : boolean | Returns whether any of the cells needed to be wrapped into multiple lines. | |
setCells ( array $cells ) | Sets the data cells in the wrapper. |
메소드 | 설명 | |
---|---|---|
initRows ( Webmozart\Console\Api\Formatter\Formatter $formatter ) | ||
refreshColumnLength ( $col ) | ||
resetState ( $maxTotalWidth, $nbColumns ) | ||
wrapColumn ( $col, $columnLength, Webmozart\Console\Api\Formatter\Formatter $formatter ) | ||
wrapColumns ( Webmozart\Console\Api\Formatter\Formatter $formatter ) |
public fit ( integer $maxTotalWidth, integer $nbColumns, Webmozart\Console\Api\Formatter\Formatter $formatter ) | ||
$maxTotalWidth | integer | The maximum total width of the columns. |
$nbColumns | integer | The number of columns to use. |
$formatter | Webmozart\Console\Api\Formatter\Formatter | The formatter used to remove style tags. |
public getCells ( ) : string[] | ||
리턴 | string[] | The data cells. |
public getColumnLengths ( ) : int[] | ||
리턴 | int[] | The lengths of each column. |
public getEstimatedNbColumns ( integer $maxTotalWidth ) : integer | ||
$maxTotalWidth | integer | The maximum total width of the columns. |
리턴 | integer | The estimated number of columns. |
public getMaxTotalWidth ( ) : integer | ||
리턴 | integer | The maximum allowed total width. |
public getNbColumns ( ) : integer | ||
리턴 | integer | The number of columns. |
public getTotalWidth ( ) : integer | ||
리턴 | integer | The actual total column width. |
public getWrappedRows ( ) : string[][] | ||
리턴 | string[][] | An array of arrays. The first level represents rows, the second level the cells in each row. |
public hasWordCuts ( ) : boolean | ||
리턴 | boolean | Returns `true` if a cell contains words cut in two and `false` otherwise. |
public hasWordWraps ( ) : boolean | ||
리턴 | boolean | Returns `true` if a cell was wrapped into multiple lines and `false` otherwise. |