$extendedCommands : array
Bridge for executing CLI requests.
Its used by calling
public/index.php via the CLI and passing an arguement(s). Each method is actually
a command eg
php public/index.php with Crypt hash 'kitty kat'.
Extend it by calling
\Disco\classes\Console::extendConsoleWithClass(new \YourClassName) prior to setting up
the framework in
public/index.php. Each class that extends this class (the Console) will have its public
methods made available for execution directly from the CLI. For example if you extended this class with a class
that had a public method
doOurReallyBigJob that method can be executed by calling
php public/index.php doOurReallyBigJob or even
php public/index.php do-our-really-big-job. Any arguments
that come after the first parameter will be passed to the method in an indexed array. So for example you call
php public/index.php doOurReallyBigJob 1552 test the method
doOurReallyBigJob will be passed an array as the
first argument that will contain these values
dbBackup(array $args, boolean $structureOnly = false)
Create a new backup of the DB. If you want to alter the default dumping behavior create a configuration file at `app/config/db-backup-settings.php` and return an array with the settings you want to alter. The full list of settings can be found at https://github.com/ifsnop/mysqldump-php#dump-settings . By default if you do not specify a value for `add-drop-table` it will be set to `true`.
db-backup /app/db/ BACKUP.sql
Whether to backup only the structure.
Create a model or a record. Use the special keyword `all` in place of a table name to generate records or models for all tables.
create model user
create model user /app/config/model.format /app/model/
create record user
create record user /app/config/record.format /app/record/
consoleQuestion(string $question, array $options) : mixed
Prompt the user at the console with a question and the valid options that serve as an answer to that question.
The question being asked.
The possible answers to the question being asked, where the keys are the anwsers and the values are the description of the answer.
The selected key from $options param.
consolePrompt(string $question, boolean $cannotBeBlank = false) : string
Prompt the user at the console to enter a free form text response to a question.
The question that needs a response.
The response to the question cannot be blank.
The response to the question.