1 | <?php |
||
21 | class CommandFactory |
||
22 | { |
||
23 | /** |
||
24 | * @var Application |
||
25 | */ |
||
26 | protected $application; |
||
27 | |||
28 | /** |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $psr4Data; |
||
32 | |||
33 | /** |
||
34 | * CommandFactory constructor |
||
35 | * |
||
36 | * @param Application $application |
||
37 | * @param array $psr4Data |
||
38 | */ |
||
39 | public function __construct(Application $application, array $psr4Data = []) |
||
44 | |||
45 | /** |
||
46 | * Load all slick commands |
||
47 | */ |
||
48 | public function loadCommands() |
||
58 | |||
59 | /** |
||
60 | * Retrieves all Slick modules installed from composer |
||
61 | * |
||
62 | * @return array |
||
63 | */ |
||
64 | protected function filterSlickModules() |
||
75 | |||
76 | /** |
||
77 | * Get user defined classes in "Console\Command" name space of each module |
||
78 | * |
||
79 | * @param array $modules |
||
80 | * @return array |
||
81 | */ |
||
82 | protected function getCommandClasses(array $modules) |
||
90 | |||
91 | /** |
||
92 | * Get classes that implements the Command interface |
||
93 | * |
||
94 | * @param string $namespace |
||
95 | * @param string $path |
||
96 | * |
||
97 | * @return array |
||
98 | */ |
||
99 | protected function getClasses($namespace, $path) |
||
114 | } |