Adds interaction to a console command.
More...
Adds interaction to a console command.
Definition at line 18 of file BaseCommand.php.
◆ argument()
| Elgg\Cli\BaseCommand::argument |
( |
|
$name | ) |
|
Returns argument value.
- Parameters
-
- Returns
- mixed
Definition at line 170 of file BaseCommand.php.
◆ ask()
| Elgg\Cli\BaseCommand::ask |
( |
|
$question, |
|
|
|
$default = null, |
|
|
|
$hidden = false, |
|
|
|
$required = true |
|
) |
| |
Ask a question.
- Parameters
-
| string | $question | Question to ask |
| mixed | $default | Default value |
| bool | $hidden | Hide response |
| bool | $required | User input is required |
- Returns
- mixed
Definition at line 44 of file BaseCommand.php.
◆ assertNotEmpty()
| Elgg\Cli\BaseCommand::assertNotEmpty |
( |
|
$answer | ) |
|
Question validator for required user response.
- Parameters
-
- Returns
- bool
- Exceptions
-
Definition at line 182 of file BaseCommand.php.
◆ dump()
| Elgg\Cli\BaseCommand::dump |
( |
|
$data | ) |
|
|
final |
Dump a variable.
- Parameters
-
- Returns
- void
Definition at line 82 of file BaseCommand.php.
◆ dumpRegisters()
| Elgg\Cli\BaseCommand::dumpRegisters |
( |
| ) |
|
|
finalprotected |
Dump and output system and error messages.
- Returns
- void
Definition at line 194 of file BaseCommand.php.
◆ error()
| Elgg\Cli\BaseCommand::error |
( |
|
$message | ) |
|
Print an error.
- Parameters
-
| string | $message | Error message |
- Returns
- void
Definition at line 132 of file BaseCommand.php.
◆ notice()
| Elgg\Cli\BaseCommand::notice |
( |
|
$message | ) |
|
Print a notice.
- Parameters
-
| string | $message | Error message |
- Returns
- void
Definition at line 146 of file BaseCommand.php.
◆ option()
| Elgg\Cli\BaseCommand::option |
( |
|
$name | ) |
|
Returns option value.
- Parameters
-
- Returns
- mixed
Definition at line 159 of file BaseCommand.php.
◆ write()
| Elgg\Cli\BaseCommand::write |
( |
|
$messages, |
|
|
|
$style = 'info' |
|
) |
| |
|
final |
Write messages to output buffer.
- Parameters
-
| string | array | $messages | Data or messages |
| string | $style | Output style |
- Returns
- void
Definition at line 96 of file BaseCommand.php.
◆ $input
| Elgg\Cli\BaseCommand::$input |
|
protected |
◆ $output
| Elgg\Cli\BaseCommand::$output |
|
protected |
◆ DEFAULT_VERBOSITY
| const Elgg\Cli\BaseCommand::DEFAULT_VERBOSITY = OutputInterface::VERBOSITY_NORMAL |
The documentation for this class was generated from the following file: