PHP 클래스 Webmozart\Console\UI\Component\LabeledParagraph
The paragraph is indented to the right of the label and wrapped into the
dimensions of the output. You can align multiple labeled paragraphs by
passing a {@link LabelAlignment} to {@link setAlignment()}.
파일 보기
프로젝트 열기: webmozart/console
1 사용 예제들
공개 메소드들
메소드 상세
Creates a new labeled paragraph.
public __construct ( string $label, string $text, integer $padding = 2, boolean $aligned = true ) |
$label |
string |
The label. |
$text |
string |
The text. |
$padding |
integer |
The padding between the text and label in number
of spaces. |
$aligned |
boolean |
Whether the paragraph should be aligned with the
other paragraph in its alignment (if one is set). |
Returns the padding between the label and the text in number of spaces.
Returns whether the paragraph is aligned with other paragraphs in its
alignment.
public isAligned ( ) : boolean |
리턴 |
boolean |
Returns `true` if the paragraph should be aligned with the
other paragraphs in the alignment and `false` otherwise. |
public render ( IO $io, integer $indentation ) |
$io |
Webmozart\Console\Api\IO\IO |
The I/O. |
$indentation |
integer |
The number of spaces to indent. |
Sets the alignment used to align the paragraph.
public setAlignment ( LabelAlignment $alignment ) |
$alignment |
Webmozart\Console\UI\Alignment\LabelAlignment |
The alignment. |