Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function getRoutes() |
||
33 | { |
||
34 | $list = array(); |
||
35 | |||
36 | foreach (glob(__DIR__ . '/config/*.php') as $file) { |
||
37 | |||
38 | $command = pathinfo($file, PATHINFO_FILENAME); |
||
39 | $list[$command] = gplcart_config_get($file); |
||
40 | |||
41 | $parts = explode('-', $command); |
||
42 | $method = array_pop($parts); |
||
43 | $class_name = implode('', $parts); |
||
44 | |||
45 | $list[$command]['handlers']['controller'] = array( |
||
46 | "gplcart\\modules\\cli\\controllers\\$class_name", "cmd$method$class_name"); |
||
47 | } |
||
48 | |||
49 | return $list; |
||
50 | } |
||
51 | |||
53 |