Where does the Module Manager in zf2 gets registered as a Service of the Service Manager?

StackOverflow https://stackoverflow.com/questions/23546920

  •  18-07-2023
  •  | 
  •  

Question

i'm reading the code of Zendframework 2, in order to understand it better. I can't find the place in the code where the Module Manager gets registered in the Service Manager as a service. Any help is much appreciated.

Greetings, Todor

Was it helpful?

Solution

\Zend\Mvc\Application::init() creates the service manager, passing in a ServiceManagerConfig, which by default defines a few factories.

So in a typical \Zend\Mvc\Application, the module manager get wired into the ServiceManager via that factory. The factory is responsible for creating the ModuleManager the first time it's requested.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top