1 | <?php |
||
12 | class ConfigProvider |
||
13 | { |
||
14 | /** |
||
15 | * @return mixed[] |
||
16 | */ |
||
17 | 1 | public function __invoke() : array |
|
29 | |||
30 | /** |
||
31 | * Return application-level dependency configuration |
||
32 | * |
||
33 | * @return mixed[] |
||
34 | */ |
||
35 | 31 | public function getDependencyConfig() : array |
|
36 | { |
||
37 | // phpcs:disable Generic.Files.LineLength |
||
38 | return [ |
||
39 | 31 | 'invokables' => ['DoctrineModule\Authentication\Storage\Session' => 'Laminas\Authentication\Storage\Session'], |
|
40 | 'factories' => ['doctrine.cli' => 'DoctrineModule\Service\CliFactory'], |
||
41 | 'abstract_factories' => ['DoctrineModule' => 'DoctrineModule\ServiceFactory\AbstractDoctrineServiceFactory'], |
||
42 | ]; |
||
43 | } |
||
44 | |||
45 | // phpcs:enable Generic.Files.LineLength |
||
46 | |||
47 | /** |
||
48 | * Return controller configuration |
||
49 | * |
||
50 | * @return mixed[] |
||
51 | */ |
||
52 | 31 | public function getControllerConfig() : array |
|
53 | { |
||
54 | return [ |
||
55 | 31 | 'factories' => ['DoctrineModule\Controller\Cli' => 'DoctrineModule\Service\CliControllerFactory'], |
|
56 | ]; |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * Return route manager configuration |
||
61 | * |
||
62 | * @return mixed[] |
||
63 | */ |
||
64 | 31 | public function getRouteManagerConfig() : array |
|
65 | { |
||
66 | return [ |
||
67 | 31 | 'factories' => ['symfony_cli' => 'DoctrineModule\Service\SymfonyCliRouteFactory'], |
|
68 | ]; |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * Return configuration for console routes |
||
73 | * |
||
74 | * @return mixed[] |
||
75 | */ |
||
76 | 31 | public function getConsoleConfig() : array |
|
77 | { |
||
78 | return [ |
||
79 | 31 | 'router' => [ |
|
80 | 'routes' => [ |
||
81 | 'doctrine_cli' => ['type' => 'symfony_cli'], |
||
82 | ], |
||
83 | ], |
||
84 | ]; |
||
85 | } |
||
86 | |||
87 | /** |
||
88 | * Default configuration for Doctrine module |
||
89 | * |
||
90 | * @return mixed[] |
||
91 | */ |
||
92 | 31 | public function getDoctrineConfig() : array |
|
168 | |||
169 | /** |
||
170 | * Factory mappings - used to define which factory to use to instantiate a particular doctrine service type |
||
171 | * |
||
172 | * @return mixed[] |
||
173 | */ |
||
174 | 31 | public function getDoctrineFactoryConfig() : array |
|
175 | { |
||
176 | return [ |
||
177 | 31 | 'cache' => 'DoctrineModule\Service\CacheFactory', |
|
178 | 'eventmanager' => 'DoctrineModule\Service\EventManagerFactory', |
||
179 | 'driver' => 'DoctrineModule\Service\DriverFactory', |
||
180 | 'authenticationadapter' => 'DoctrineModule\Service\Authentication\AdapterFactory', |
||
181 | 'authenticationstorage' => 'DoctrineModule\Service\Authentication\StorageFactory', |
||
182 | 'authenticationservice' => 'DoctrineModule\Service\Authentication\AuthenticationServiceFactory', |
||
183 | ]; |
||
184 | } |
||
185 | |||
186 | /** |
||
187 | * @return mixed[] |
||
188 | */ |
||
189 | 31 | public function getValidatorConfig() : array |
|
204 | } |
||
205 |