I've been looking for information on this question but the only answer I can find is by looking at how other modules take care of this. So far, I have seen this:
With CdliTwoStageSignup in Module.php
'factories' => array(
.
.
'cdlitwostagesignup_module_options' => function($sm) {
$config = $sm->get('Configuration');
return new Options\ModuleOptions($config['cdli-twostagesignup']);
},
.
}
With ZfcUser in Module.php
'factories' => array(
'zfcuser_module_options' => function ($sm) {
$config = $sm->get('Config');
return new Options\ModuleOptions(isset($config['zfcuser']) ? $config['zfcuser'] : array());
},
Based on Zend 2 documentation, ModuleManager Merges all the module.config.php of each module and is set in the service manager. Also, config files in .config/autoload directory can override the module config files.
To access the configurations, these two modules seem to use the keywords: "Config" and "Configuration".
- Are these always the the keywords used with the service manager to get to config files?
- Is there any difference between choosing one over the other?
Appreciate any answer you can provide.