SetConfigurationCommand

Extends \Joomla\Console\Command\AbstractCommand

Console command Setting Configuration options

since

4.0.0

package

Application

Methods

checkDb

Verifies database connection

checkDb(array options) : bool|\Joomla\Database\DatabaseInterface
since

4.0.0

throws

\Exception

Arguments

options

arrayOptions array

Response

bool|\Joomla\Database\DatabaseInterface

configure

Initialise the command.

configure() : void
since

4.0.0

configureIO

Configures the IO

configureIO(\Symfony\Component\Console\Input\InputInterface input, \Symfony\Component\Console\Output\OutputInterface output) : void
since

4.0.0

Arguments

input

\Symfony\Component\Console\Input\InputInterfaceConsole Input

output

\Symfony\Component\Console\Output\OutputInterfaceConsole Output

doExecute

Internal function to execute the command.

doExecute(\Symfony\Component\Console\Input\InputInterface input, \Symfony\Component\Console\Output\OutputInterface output) : int
since

4.0.0

throws

\Exception

Arguments

input

\Symfony\Component\Console\Input\InputInterfaceThe input to inject into the command.

output

\Symfony\Component\Console\Output\OutputInterfaceThe output to inject into the command.

Response

intThe command exit code

getInitialConfigurationOptions

Returns Default configuration Object

getInitialConfigurationOptions() : \Joomla\Registry\Registry
since

4.0.0

Response

\Joomla\Registry\Registry

getOptions

Collects the options array

getOptions() : array|mixed
since

4.0.0

Response

array|mixed

retrieveOptionsFromInput

Collects options from user input

retrieveOptionsFromInput(array options) : bool
since

4.0.0

Arguments

options

arrayOptions input by users

Response

bool

sanitizeOptions

Sanitize the options array for boolean

sanitizeOptions(array options) : array
since

4.0.0

Arguments

options

arrayOptions array

Response

array

saveConfiguration

Save the configuration file

saveConfiguration(array options) : bool
since

4.0.0

Arguments

options

arrayOptions array

Response

bool

setOptions

Sets the options array

setOptions(string options) : void
since

4.0.0

Arguments

options

stringOptions string

validateOptions

Validates the options provided

validateOptions() : bool
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

static
since

4.0.0

Type(s)

string

cliInput

Stores the Input Object

since

4.0.0

Type(s)

\Symfony\Component\Console\Input\Input

ioStyle

SymfonyStyle Object

since

4.0.0

Type(s)

\Symfony\Component\Console\Style\SymfonyStyle

options

Options Array

since

4.0.0

Type(s)

array