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 | * Loads the requested setup task class |
||
41 | * |
||
42 | * @param string $classname Name of the setup task class |
||
43 | * @return boolean True if class is found, false if not |
||
44 | */ |
||
45 | public static function autoload( $classname ) |
||
64 | |||
65 | |||
66 | /** |
||
67 | * Execute the console command. |
||
68 | * |
||
69 | * @return mixed |
||
70 | */ |
||
71 | public function fire() |
||
101 | |||
102 | |||
103 | /** |
||
104 | * Get the console command arguments. |
||
105 | * |
||
106 | * @return array |
||
107 | */ |
||
108 | protected function getArguments() |
||
115 | |||
116 | |||
117 | /** |
||
118 | * Get the console command options. |
||
119 | * |
||
120 | * @return array |
||
121 | */ |
||
122 | protected function getOptions() |
||
128 | |||
129 | |||
130 | /** |
||
131 | * Returns the database configuration from the config object. |
||
132 | * |
||
133 | * @param \Aimeos\MW\Config\Iface $conf Config object |
||
134 | * @return array Multi-dimensional associative list of database configuration parameters |
||
135 | */ |
||
136 | protected function getDbConfig( \Aimeos\MW\Config\Iface $conf ) |
||
149 | |||
150 | |||
151 | /** |
||
152 | * Extracts the configuration options from the input object and updates the configuration values in the config object. |
||
153 | * |
||
154 | * @param \Aimeos\MW\Config\Iface $conf Configuration object |
||
155 | * @param array Associative list of database configurations |
||
156 | * @throws \RuntimeException If the format of the options is invalid |
||
157 | */ |
||
158 | protected function setOptions( \Aimeos\MW\Config\Iface $conf ) |
||
166 | } |
||
167 |