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

CLI bootstrap. More...

Public Member Functions

 __construct (EventsService $events, InputInterface $input, OutputInterface $output)
 Constructor. More...
 
 add ($command)
 Add a new CLI command. More...
 
 run (bool $bootstrap=true)
 Bootstrap and run console application. More...
 
 getInput ()
 Returns console input. More...
 
 getOutput ()
 Returns console output. More...
 

Protected Member Functions

 bootstrap ()
 Add CLI tools to the console application. More...
 
 getCoreCommands ()
 Returns the core cli commands. More...
 
 getPluginCommands ()
 Returns the cli commands registered in plugins. More...
 

Protected Attributes

 $console
 
 $events
 
 $input
 
 $output
 

Detailed Description

CLI bootstrap.

Definition at line 16 of file Cli.php.

Constructor & Destructor Documentation

Elgg\Cli::__construct ( EventsService  $events,
InputInterface  $input,
OutputInterface  $output 
)

Constructor.

Parameters
EventsService$eventsEvents service
InputInterface$inputConsole input
OutputInterface$outputConsole output

Definition at line 47 of file Cli.php.

Member Function Documentation

Elgg\Cli::add (   $command)

Add a new CLI command.

Parameters
string$commandCommand class Must extend
Returns
void

Definition at line 115 of file Cli.php.

Elgg\Cli::bootstrap ( )
protected

Add CLI tools to the console application.

Returns
void

Definition at line 67 of file Cli.php.

Elgg\Cli::getCoreCommands ( )
protected

Returns the core cli commands.

Returns
array

Definition at line 81 of file Cli.php.

Elgg\Cli::getInput ( )

Returns console input.

Returns
InputInterface

Definition at line 166 of file Cli.php.

Elgg\Cli::getOutput ( )

Returns console output.

Returns
OutputInterface

Definition at line 175 of file Cli.php.

Elgg\Cli::getPluginCommands ( )
protected

Returns the cli commands registered in plugins.

Returns
array

Definition at line 91 of file Cli.php.

Elgg\Cli::run ( bool  $bootstrap = true)

Bootstrap and run console application.

Parameters
bool$bootstrapIs bootstrap needed?
Returns
void

Definition at line 153 of file Cli.php.

Member Data Documentation

Elgg\Cli::$console
protected

Definition at line 23 of file Cli.php.

Elgg\Cli::$events
protected

Definition at line 28 of file Cli.php.

Elgg\Cli::$input
protected

Definition at line 33 of file Cli.php.

Elgg\Cli::$output
protected

Definition at line 38 of file Cli.php.


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