1 | <?php |
||
22 | class Module implements |
||
23 | ControllerProviderInterface, |
||
24 | ConfigProviderInterface, |
||
25 | DependencyIndicatorInterface |
||
26 | { |
||
27 | /** |
||
28 | * {@inheritDoc} |
||
29 | */ |
||
30 | 72 | public function init(ModuleManagerInterface $manager) |
|
31 | { |
||
32 | // Initialize the console |
||
33 | $manager |
||
34 | 72 | ->getEventManager() |
|
35 | 72 | ->getSharedManager() |
|
36 | 72 | ->attach( |
|
37 | 72 | 'doctrine', |
|
38 | 72 | 'loadCli.post', |
|
39 | function (EventInterface $event) { |
||
40 | $event |
||
41 | ->getParam('ServiceManager') |
||
42 | ->get(CliConfigurator::class) |
||
43 | ->configure($event->getTarget()) |
||
44 | ; |
||
45 | 72 | }, |
|
46 | 72 | 1 |
|
47 | ); |
||
48 | |||
49 | // Initialize logger collector in Laminas\DeveloperTools |
||
50 | 72 | if (class_exists(ProfilerEvent::class)) { |
|
51 | $manager |
||
52 | 72 | ->getEventManager() |
|
53 | 72 | ->attach( |
|
54 | 72 | ProfilerEvent::EVENT_PROFILER_INIT, |
|
55 | function ($event) { |
||
56 | $container = $event->getTarget()->getParam('ServiceManager'); |
||
57 | $container->get('doctrine.sql_logger_collector.orm_default'); |
||
58 | 72 | } |
|
59 | ); |
||
60 | } |
||
61 | 72 | } |
|
62 | |||
63 | /** |
||
64 | * {@inheritDoc} |
||
65 | */ |
||
66 | 72 | public function getConfig() |
|
70 | |||
71 | /** |
||
72 | * {@inheritDoc} |
||
73 | */ |
||
74 | 72 | public function getControllerConfig() |
|
78 | |||
79 | /** |
||
80 | * {@inheritDoc} |
||
81 | */ |
||
82 | 72 | public function getModuleDependencies() |
|
86 | } |
||
87 |