Elgg  Version 3.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Elgg\Cli\BaseCommand Class Reference

Adds interaction to a console command. More...

Inheritance diagram for Elgg\Cli\BaseCommand:
Elgg\Cli\Command Elgg\Cli\InstallCommand Elgg\Cli\UpgradeCommand Elgg\Cli\CronCommand Elgg\Cli\DatabaseSeedCommand Elgg\Cli\DatabaseUnseedCommand Elgg\Cli\FlushCommand Elgg\Cli\PluginsActivateCommand Elgg\Cli\PluginsDeactivateCommand Elgg\Cli\PluginsListCommand Elgg\Cli\SimpletestCommand

Public Member Functions

 ask ($question, $default=null, $hidden=false, $required=true)
 Ask a question. More...
 
 dump ($data)
 Dump a variable. More...
 
 write ($messages, $level=LogLevel::INFO)
 Write messages to output buffer. More...
 
 error ($message)
 Print an error. More...
 
 notice ($message)
 Print a notce. More...
 
 option ($name)
 Returns option value. More...
 
 argument ($name)
 Returns argument value. More...
 
 assertNotEmpty ($answer)
 Question validator for required user response. More...
 

Public Attributes

const DEFAULT_VERBOSITY = OutputInterface::VERBOSITY_NORMAL
 

Protected Member Functions

 dumpRegisters ()
 Dump and output system and error messages. More...
 

Protected Attributes

 $input
 
 $output
 

Detailed Description

Adds interaction to a console command.

Definition at line 17 of file BaseCommand.php.

Member Function Documentation

Elgg\Cli\BaseCommand::argument (   $name)

Returns argument value.

Parameters
string$nameArgument name
Returns
mixed

Definition at line 153 of file BaseCommand.php.

Elgg\Cli\BaseCommand::ask (   $question,
  $default = null,
  $hidden = false,
  $required = true 
)

Ask a question.

Parameters
string$questionQuestion to ask
mixed$defaultDefault value
bool$hiddenHide response
bool$requiredUser input is required
Returns
mixed

Definition at line 43 of file BaseCommand.php.

Elgg\Cli\BaseCommand::assertNotEmpty (   $answer)

Question validator for required user response.

Parameters
mixed$answerUser answer
Returns
bool

Definition at line 164 of file BaseCommand.php.

Elgg\Cli\BaseCommand::dump (   $data)
final

Dump a variable.

Parameters
mixed$dataData to dump
Returns
void

Definition at line 73 of file BaseCommand.php.

Elgg\Cli\BaseCommand::dumpRegisters ( )
finalprotected

Dump and output system and error messages.

Returns
void

Definition at line 176 of file BaseCommand.php.

Elgg\Cli\BaseCommand::error (   $message)

Print an error.

Parameters
string$messageError message
Returns
void

Definition at line 116 of file BaseCommand.php.

Elgg\Cli\BaseCommand::notice (   $message)

Print a notce.

Parameters
string$messageError message
Returns
void

Definition at line 129 of file BaseCommand.php.

Elgg\Cli\BaseCommand::option (   $name)

Returns option value.

Parameters
string$nameOption name
Returns
mixed

Definition at line 142 of file BaseCommand.php.

Elgg\Cli\BaseCommand::write (   $messages,
  $level = LogLevel::INFO 
)
final

Write messages to output buffer.

Parameters
string | array$messagesData or messages
string$levelLogging level/servity
Returns
void

Definition at line 85 of file BaseCommand.php.

Member Data Documentation

Elgg\Cli\BaseCommand::$input
protected

Definition at line 26 of file BaseCommand.php.

Elgg\Cli\BaseCommand::$output
protected

Definition at line 31 of file BaseCommand.php.

const Elgg\Cli\BaseCommand::DEFAULT_VERBOSITY = OutputInterface::VERBOSITY_NORMAL

Definition at line 21 of file BaseCommand.php.


The documentation for this class was generated from the following file: