1 | <?php |
||
38 | class Module implements |
||
39 | BootstrapListenerInterface, |
||
40 | ControllerProviderInterface, |
||
41 | ConfigProviderInterface, |
||
42 | DependencyIndicatorInterface |
||
43 | { |
||
44 | /** |
||
45 | * {@inheritDoc} |
||
46 | */ |
||
47 | 16 | public function onBootstrap(EventInterface $event) |
|
48 | { |
||
49 | /* @var $application \Zend\Mvc\Application */ |
||
50 | 16 | $application = $event->getTarget(); |
|
51 | /* @var $container ContainerInterface */ |
||
52 | 16 | $container = $application->getServiceManager(); |
|
53 | |||
54 | 16 | $events = $application->getEventManager(); |
|
55 | |||
56 | // Initialize logger collector once the profiler is initialized itself |
||
57 | 16 | $events->attach( |
|
58 | 16 | 'profiler_init', |
|
59 | function () use ($container) { |
||
60 | $container->get('doctrine.sql_logger_collector.orm_default'); |
||
61 | } |
||
62 | 16 | ); |
|
63 | |||
64 | /* @var $postCliLoadListener PostCliLoadListener */ |
||
65 | 16 | $postCliLoadListener = $container->get(PostCliLoadListener::class); |
|
66 | 16 | $postCliLoadListener->attach($events); |
|
67 | 16 | } |
|
68 | |||
69 | /** |
||
70 | * {@inheritDoc} |
||
71 | */ |
||
72 | 72 | public function getConfig() |
|
76 | |||
77 | /** |
||
78 | * {@inheritDoc} |
||
79 | */ |
||
80 | 72 | public function getControllerConfig() |
|
84 | |||
85 | /** |
||
86 | * {@inheritDoc} |
||
87 | */ |
||
88 | 72 | public function getModuleDependencies() |
|
92 | } |
||
93 |