WordWrapper
class WordWrapper (View source)
Properties
protected | $width | ||
protected | $minimumWidths | ||
protected | $extraPaddingAtBeginningOfLine | ||
protected | $extraPaddingAtEndOfLine | ||
protected | $paddingInEachCell |
Methods
No description
Calculate our padding widths from the specified table style.
Calculate our padding widths from the specified table style.
If columns have minimum widths, then set them here.
Set the minimum width of just one column
Wrap the cells in each part of the provided data table
Determine what widths we'll use for wrapping.
Wrap one cell. Guard against modifying non-strings and then call through to wordwrap().
Details
__construct($width)
No description
setPaddingFromStyle(TableStyle $style)
Calculate our padding widths from the specified table style.
setPaddingFromSymfony5Style(TableStyle $style)
Calculate our padding widths from the specified table style.
setMinimumWidths(array $minimumWidths)
If columns have minimum widths, then set them here.
minimumWidth($colkey, $width)
Set the minimum width of just one column
array
wrap(array $rows, $widths = [])
Wrap the cells in each part of the provided data table
protected
calculateWidths($rows, $widths = [])
Determine what widths we'll use for wrapping.
protected mixed
wrapCell(mixed $cell, string $cellWidth)
Wrap one cell. Guard against modifying non-strings and then call through to wordwrap().