Cli
in package
FinalYes
What the command-line scripts in `private/cli/` share: their prompts.
Table of Contents
Methods
- plural() : string
- A count and its noun, in the plural unless the count is 1: `2 sessions`.
- prompt() : string
- Ask a question on the terminal and read the answer.
- secret() : string
- Ask for a password without showing what is typed, when the input is a terminal.
Methods
plural()
A count and its noun, in the plural unless the count is 1: `2 sessions`.
public
static plural(int $count, string $noun) : string
Parameters
- $count : int
-
The count.
- $noun : string
-
The noun in the singular, whose plural adds an
s.
Return values
string —The count, a space and the noun.
prompt()
Ask a question on the terminal and read the answer.
public
static prompt(string $label) : string
Parameters
- $label : string
-
The question, printed as is.
Return values
string —The answer, without surrounding whitespace.
secret()
Ask for a password without showing what is typed, when the input is a terminal.
public
static secret(string $label) : string
Parameters
- $label : string
-
The question, printed as is.
Return values
string —The answer, without surrounding whitespace.