Search code examples
zend-framework2

zf2 - Retrieve the 'ApplicationConfig' in a 'ActionController'


I realise that there shouldn't be to many reasons for us to access the ApplicationConfig from a controller. But I'm still asking.. Is there a way to do that?

What I actually wishes to do is to get a hold of the
module_listener_options -> config_glob_paths key...


Solution

  • I think @timdev didn't get your point, your question could be solved by:

    $applicationConfig = $this->getServiceLocator()->get('ApplicationConfig');