1 | <?php declare(strict_types = 1); |
||
14 | class CommandCollector implements CommandCollectorContract |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Commands holder |
||
19 | * |
||
20 | * @var Command[] |
||
21 | */ |
||
22 | protected $commands = []; |
||
23 | |||
24 | /** |
||
25 | * @var Container |
||
26 | */ |
||
27 | protected $container; |
||
28 | |||
29 | /** |
||
30 | * CommandCollector constructor. |
||
31 | * |
||
32 | * @param Container $container |
||
33 | */ |
||
34 | 2 | public function __construct(Container $container) |
|
38 | |||
39 | /** |
||
40 | * @inheritDoc |
||
41 | */ |
||
42 | 2 | public function addCommand(string $commandClassName) |
|
51 | |||
52 | /** |
||
53 | * @inheritDoc |
||
54 | */ |
||
55 | 1 | public function getCommands(): array |
|
59 | |||
60 | } |