Access to module config in Zend Framework 2

前端 未结 8 2113
清酒与你
清酒与你 2021-01-30 21:05

How I can get access to my module config from the controller?

8条回答
  •  再見小時候
    2021-01-30 21:33

    You need to implements ServiceLocatorAwareInterface from your model. And then you can set setServiceLocator() and getServiceLocator() which give you direct access to the service manager. Take a look at this code sample https://gist.github.com/ppeiris/7308289

提交回复
热议问题