707cb89cdc4bff2f603a391d6a847d76253385c5
[yaffs-website] / vendor / drush / drush / src / Commands / OptionsCommands.php
1 <?php
2 namespace Drush\Commands;
3
4 /*
5  * Common options providers. Use them by adding an annotation to your method.
6  */
7 use Symfony\Component\Console\Input\InputOption;
8
9 class OptionsCommands
10 {
11
12     const REQ=InputOption::VALUE_REQUIRED;
13
14     /**
15      * @hook option @optionset_proc_build
16      * @option ssh-options A string of extra options that will be passed to the ssh command (e.g. "-p 100")
17      * @option tty Create a tty (e.g. to run an interactive program).
18      */
19     public function optionsetProcBuild($options = ['ssh-options' => self::REQ, 'tty' => false])
20     {
21     }
22
23     /**
24      * @hook option @optionset_get_editor
25      * @option editor A string of bash which launches user's preferred text editor. Defaults to ${VISUAL-${EDITOR-vi}}.
26      * @option bg Run editor in the background. Does not work with editors such as `vi` that run in the terminal.
27      */
28     public function optionsetGetEditor($options = ['editor' => '', 'bg' => false])
29     {
30     }
31
32     /**
33      * @hook option @optionset_ssh
34      * @option ssh-options A string appended to ssh command during rsync, sql-sync, etc.
35      */
36     public function optionsetSsh($options = ['ssh-options' => self::REQ])
37     {
38     }
39
40     /**
41      * @hook option @optionset_sql
42      * @option database The DB connection key if using multiple connections in settings.php.
43      * @option db-url A Drupal 6 style database URL.
44      * @option target The name of a target within the specified database connection. Defaults to default
45      */
46     public function optionsetSql($options = ['database' => 'default', 'target' => 'default', 'db-url' => self::REQ])
47     {
48     }
49
50     /**
51      * @hook option @optionset_table_selection
52      * @option skip-tables-key A key in the $skip_tables array. @see example.drush.yml
53      * @option structure-tables-key A key in the $structure_tables array. @see example.drush.yml
54      * @option tables-key A key in the $tables array.
55      * @option skip-tables-list A comma-separated list of tables to exclude completely.
56      * @option structure-tables-list A comma-separated list of tables to include for structure, but not data.
57      * @option tables-list A comma-separated list of tables to transfer.
58      */
59     public function optionsetTableSelection($options = [
60         'skip-tables-key' => self::REQ,
61         'structure-tables-key' => self::REQ,
62         'tables-key' => self::REQ,
63         'skip-tables-list' => self::REQ,
64         'structure-tables-list' => self::REQ,
65         'tables-list' => self::REQ])
66     {
67     }
68 }