1 | <?php |
||
38 | class CliConfigurator |
||
39 | { |
||
40 | private $defaultObjectManagerName = 'doctrine.entitymanager.orm_default'; |
||
41 | |||
42 | private $commands = [ |
||
43 | 'doctrine.dbal_cmd.runsql', |
||
44 | 'doctrine.dbal_cmd.import', |
||
45 | 'doctrine.orm_cmd.clear_cache_metadata', |
||
46 | 'doctrine.orm_cmd.clear_cache_result', |
||
47 | 'doctrine.orm_cmd.clear_cache_query', |
||
48 | 'doctrine.orm_cmd.schema_tool_create', |
||
49 | 'doctrine.orm_cmd.schema_tool_update', |
||
50 | 'doctrine.orm_cmd.schema_tool_drop', |
||
51 | 'doctrine.orm_cmd.ensure_production_settings', |
||
52 | 'doctrine.orm_cmd.convert_d1_schema', |
||
53 | 'doctrine.orm_cmd.generate_repositories', |
||
54 | 'doctrine.orm_cmd.generate_entities', |
||
55 | 'doctrine.orm_cmd.generate_proxies', |
||
56 | 'doctrine.orm_cmd.convert_mapping', |
||
57 | 'doctrine.orm_cmd.run_dql', |
||
58 | 'doctrine.orm_cmd.validate_schema', |
||
59 | 'doctrine.orm_cmd.info', |
||
60 | ]; |
||
61 | |||
62 | private $migrationCommands = [ |
||
63 | 'doctrine.migrations_cmd.execute', |
||
64 | 'doctrine.migrations_cmd.generate', |
||
65 | 'doctrine.migrations_cmd.migrate', |
||
66 | 'doctrine.migrations_cmd.status', |
||
67 | 'doctrine.migrations_cmd.version', |
||
68 | 'doctrine.migrations_cmd.diff', |
||
69 | 'doctrine.migrations_cmd.latest', |
||
70 | ]; |
||
71 | |||
72 | /** |
||
73 | * @var ContainerInterface |
||
74 | */ |
||
75 | private $container; |
||
76 | |||
77 | 72 | public function __construct(ContainerInterface $container) |
|
81 | |||
82 | 18 | public function configure(Application $cli) |
|
101 | |||
102 | /** |
||
103 | * @param EntityManagerInterface $objectManager |
||
104 | * @return array |
||
105 | */ |
||
106 | 18 | private function getHelpers(EntityManagerInterface $objectManager) |
|
121 | |||
122 | /** |
||
123 | * @return InputOption |
||
124 | */ |
||
125 | 18 | private function createObjectManagerInputOption() |
|
135 | |||
136 | /** |
||
137 | * @return string |
||
138 | */ |
||
139 | 18 | private function getObjectManagerName() |
|
149 | |||
150 | /** |
||
151 | * @return array |
||
152 | */ |
||
153 | 18 | private function getAvailableCommands() |
|
161 | } |
||
162 |