1 | <?php |
||
22 | class SetupCommand extends AbstractCommand |
||
23 | { |
||
24 | /** |
||
25 | * The console command name. |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $name = 'aimeos:setup'; |
||
30 | |||
31 | /** |
||
32 | * The console command description. |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $description = 'Initialize or update the Aimeos database tables'; |
||
37 | |||
38 | |||
39 | /** |
||
40 | * Execute the console command. |
||
41 | * |
||
42 | * @return mixed |
||
43 | */ |
||
44 | public function fire() |
||
81 | |||
82 | |||
83 | /** |
||
84 | * Get the console command arguments. |
||
85 | * |
||
86 | * @return array |
||
87 | */ |
||
88 | protected function getArguments() |
||
95 | |||
96 | |||
97 | /** |
||
98 | * Get the console command options. |
||
99 | * |
||
100 | * @return array |
||
101 | */ |
||
102 | protected function getOptions() |
||
110 | |||
111 | |||
112 | /** |
||
113 | * Returns the database configuration from the config object. |
||
114 | * |
||
115 | * @param \Aimeos\MW\Config\Iface $conf Config object |
||
116 | * @return array Multi-dimensional associative list of database configuration parameters |
||
117 | */ |
||
118 | protected function getDbConfig( \Aimeos\MW\Config\Iface $conf ) |
||
131 | |||
132 | |||
133 | /** |
||
134 | * Extracts the configuration options from the input object and updates the configuration values in the config object. |
||
135 | * |
||
136 | * @param \Aimeos\MW\Config\Iface $conf Configuration object |
||
137 | * @param array Associative list of database configurations |
||
138 | * @throws \RuntimeException If the format of the options is invalid |
||
139 | */ |
||
140 | protected function setOptions( \Aimeos\MW\Config\Iface $conf ) |
||
148 | } |
||
149 |