1 | <?php |
||
23 | class IdeHelperCommand extends Command |
||
24 | { |
||
25 | const NAME = 'ide-helper'; |
||
26 | const DESCRIPTION = 'Generate IDE help classes'; |
||
27 | |||
28 | const OPTIONS = [ |
||
29 | [ |
||
30 | 'writers', |
||
31 | 'w', |
||
32 | InputOption::VALUE_OPTIONAL, |
||
33 | 'Comma-separated writers to use', |
||
34 | null |
||
35 | ], |
||
36 | [ |
||
37 | 'locators', |
||
38 | 'l', |
||
39 | InputOption::VALUE_OPTIONAL, |
||
40 | 'Comma-separated locators to use', |
||
41 | null |
||
42 | ], |
||
43 | ]; |
||
44 | |||
45 | /** |
||
46 | * @var FactoryInterface |
||
47 | */ |
||
48 | private $factory; |
||
49 | |||
50 | /** |
||
51 | * IdeHelperCommand constructor. |
||
52 | * |
||
53 | * @param ContainerInterface $container |
||
54 | * @param FactoryInterface $factory |
||
55 | */ |
||
56 | public function __construct(ContainerInterface $container, FactoryInterface $factory) |
||
62 | |||
63 | /** |
||
64 | * @param IdeHelperConfig $config |
||
65 | */ |
||
66 | public function perform(IdeHelperConfig $config) |
||
88 | |||
89 | /** |
||
90 | * @param array $scopes |
||
91 | * @param array $writers |
||
92 | * @param array $locators |
||
93 | */ |
||
94 | private function processScopes(array $scopes, array $writers, array $locators) |
||
125 | |||
126 | /** |
||
127 | * @param array $config |
||
128 | * |
||
129 | * @return WriterInterface[] |
||
130 | */ |
||
131 | private function makeWriters(array $config): array |
||
141 | |||
142 | /** |
||
143 | * @param array $config |
||
144 | * |
||
145 | * @return LocatorInterface[] |
||
146 | */ |
||
147 | private function makeLocators(array $config): array |
||
163 | } |
||
164 |