StyleInterface
in
Output style helpers.
Tags
Table of Contents
- ask() : mixed
- Asks a question.
- askHidden() : mixed
- Asks a question with the user input hidden.
- caution() : mixed
- Formats a caution admonition.
- choice() : mixed
- Asks a choice question.
- confirm() : bool
- Asks for confirmation.
- error() : mixed
- Formats an error result bar.
- listing() : mixed
- Formats a list.
- newLine() : mixed
- Add newline(s).
- note() : mixed
- Formats a note admonition.
- progressAdvance() : mixed
- Advances the progress output X steps.
- progressFinish() : mixed
- Finishes the progress output.
- progressStart() : mixed
- Starts the progress output.
- section() : mixed
- Formats a section title.
- success() : mixed
- Formats a success result bar.
- table() : mixed
- Formats a table.
- text() : mixed
- Formats informational text.
- title() : mixed
- Formats a command title.
- warning() : mixed
- Formats an warning result bar.
Methods
ask()
Asks a question.
public
ask(string $question[, string|null $default = null ][, callable $validator = null ]) : mixed
Parameters
- $question : string
- $default : string|null = null
- $validator : callable = null
Return values
mixed —askHidden()
Asks a question with the user input hidden.
public
askHidden(string $question[, callable $validator = null ]) : mixed
Parameters
- $question : string
- $validator : callable = null
Return values
mixed —caution()
Formats a caution admonition.
public
caution(string|array<string|int, mixed> $message) : mixed
Parameters
- $message : string|array<string|int, mixed>
Return values
mixed —choice()
Asks a choice question.
public
choice(string $question, array<string|int, mixed> $choices[, string|int|null $default = null ]) : mixed
Parameters
- $question : string
- $choices : array<string|int, mixed>
- $default : string|int|null = null
Return values
mixed —confirm()
Asks for confirmation.
public
confirm(string $question[, bool $default = true ]) : bool
Parameters
- $question : string
- $default : bool = true
Return values
bool —error()
Formats an error result bar.
public
error(string|array<string|int, mixed> $message) : mixed
Parameters
- $message : string|array<string|int, mixed>
Return values
mixed —listing()
Formats a list.
public
listing(array<string|int, mixed> $elements) : mixed
Parameters
- $elements : array<string|int, mixed>
Return values
mixed —newLine()
Add newline(s).
public
newLine([int $count = 1 ]) : mixed
Parameters
- $count : int = 1
Return values
mixed —note()
Formats a note admonition.
public
note(string|array<string|int, mixed> $message) : mixed
Parameters
- $message : string|array<string|int, mixed>
Return values
mixed —progressAdvance()
Advances the progress output X steps.
public
progressAdvance([int $step = 1 ]) : mixed
Parameters
- $step : int = 1
Return values
mixed —progressFinish()
Finishes the progress output.
public
progressFinish() : mixed
Return values
mixed —progressStart()
Starts the progress output.
public
progressStart(int $max) : mixed
Parameters
- $max : int
Return values
mixed —section()
Formats a section title.
public
section(string $message) : mixed
Parameters
- $message : string
Return values
mixed —success()
Formats a success result bar.
public
success(string|array<string|int, mixed> $message) : mixed
Parameters
- $message : string|array<string|int, mixed>
Return values
mixed —table()
Formats a table.
public
table(array<string|int, mixed> $headers, array<string|int, mixed> $rows) : mixed
Parameters
- $headers : array<string|int, mixed>
- $rows : array<string|int, mixed>
Return values
mixed —text()
Formats informational text.
public
text(string|array<string|int, mixed> $message) : mixed
Parameters
- $message : string|array<string|int, mixed>
Return values
mixed —title()
Formats a command title.
public
title(string $message) : mixed
Parameters
- $message : string
Return values
mixed —warning()
Formats an warning result bar.
public
warning(string|array<string|int, mixed> $message) : mixed
Parameters
- $message : string|array<string|int, mixed>