Class LabelAlignment
Aligns labeled paragraphs.
The alignment takes Webmozart\Console\UI\Component\LabeledParagraph
instances and aligns the texts
next to the labels so that all texts start at the same offset. Pass the
paragraphs that you want to align to Webmozart\Console\UI\Alignment\LabelAlignment::add()
. When you call
Webmozart\Console\UI\Alignment\LabelAlignment::align()
, the text offset is calculated. You can retrieve the
calculated offset with Webmozart\Console\UI\Alignment\LabelAlignment::getTextOffset()
.
Namespace: Webmozart\Console\UI\Alignment
Author: Bernhard Schussek bschussek@gmail.com
Since: 1.0
Located at UI/Alignment/LabelAlignment.php
Author: Bernhard Schussek bschussek@gmail.com
Since: 1.0
Located at UI/Alignment/LabelAlignment.php
public
|
#
add(
Adds a labeled paragraph to the alignment. |
public
|
#
align(
Calculates the text offset based on all labels in the alignment. |
public
|
|
public
integer
|