SetConfigurationCommand
Extends AbstractCommandConsole command Setting Configuration options
since |
4.0.0 |
---|---|
package |
Joomla CMS |
Methods
checkDb
Verifies database connection
checkDb(mixed||string|int options) : bool|\Joomla\Database\DatabaseInterface
since |
4.0.0 |
---|---|
throws |
|
Arguments
- options
array<string|int, mixed>
Options array
Response
bool|DatabaseInterface
configure
Initialise the command.
configure() :
since |
4.0.0 |
---|
Response
void
configureIO
Configures the IO
configureIO(\Symfony\Component\Console\Input\InputInterface input, \Symfony\Component\Console\Output\OutputInterface output) :
since |
4.0.0 |
---|
Arguments
- input
InputInterface
Console Input- output
OutputInterface
Console Output
Response
void
doExecute
Internal function to execute the command.
doExecute(\Symfony\Component\Console\Input\InputInterface input, \Symfony\Component\Console\Output\OutputInterface output) :
since |
4.0.0 |
---|---|
throws |
|
Arguments
- input
InputInterface
The input to inject into the command.- output
OutputInterface
The output to inject into the command.
Response
int
The command exit code
getInitialConfigurationOptions
Returns Default configuration Object
getInitialConfigurationOptions() : \Joomla\Registry\Registry
since |
4.0.0 |
---|
Response
Registry
getOptions
Collects the options array
getOptions() : array|mixed
since |
4.0.0 |
---|
Response
array<string|int, mixed>|mixed
retrieveOptionsFromInput
Collects options from user input
retrieveOptionsFromInput(mixed||string|int options) :
since |
4.0.0 |
---|
Arguments
- options
array<string|int, mixed>
Options input by users
Response
bool
sanitizeOptions
Sanitize the options array for boolean
sanitizeOptions(mixed||string|int options) : mixed||string|int
since |
4.0.0 |
---|
Arguments
- options
array<string|int, mixed>
Options array
Response
array<string|int, mixed>
saveConfiguration
Save the configuration file
saveConfiguration(mixed||string|int options) :
since |
4.0.0 |
---|
Arguments
- options
array<string|int, mixed>
Options array
Response
bool
setOptions
Sets the options array
setOptions( options) :
since |
4.0.0 |
---|
Arguments
- options
string
Options string
Response
void
validateOptions
Validates the options provided
validateOptions() :
since |
4.0.0 |
---|
Response
bool
Constants
CONFIG_SET_SUCCESSFUL
Return code if configuration is set successfully
Value | 0 |
---|---|
since |
4.0.0 |
CONFIG_SET_FAILED
Return code if configuration set failed
Value | 1 |
---|---|
since |
4.0.0 |
CONFIG_VALIDATION_FAILED
Return code if config validation failed
Value | 2 |
---|---|
since |
4.0.0 |
CONFIG_OPTIONS_WRONG
Return code if options are wrong
Value | 3 |
---|---|
since |
4.0.0 |
DB_VALIDATION_FAILED
Return code if database validation failed
Value | 4 |
---|---|
since |
4.0.0 |
Properties
defaultName
The default command name
since |
4.0.0 |
---|
Type(s)
string
cliInput
Stores the Input Object
since |
4.0.0 |
---|
Type(s)
Input
ioStyle
SymfonyStyle Object
since |
4.0.0 |
---|
Type(s)
SymfonyStyle
options
Options Array
since |
4.0.0 |
---|
Type(s)
array<string|int, mixed>