I’m trying to configure a module in Zend Framework 2 but I’m confused as to what the possible parameter names and values are.
Is there any reference for this? I’ve looked everywhere but cannot find anything.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The question is somewhat unclear. Are you trying to configure a module written by someone else, or are you asking about how to make your own module provide user-friendly configuration?
Both questions get answered by understanding how configuration works.
In a well-designed module, you’ll usually have a
configdirectory, that will contain two files:config/module.config.phpand<modulename>.global.php.dist.module.config.phpis for internal (private) configuration. Someone using your module probably doesn’t care about the contents.<modulename>.global.php.distcontains all the configuration data that a user might want to change. A developer using the module copies this file into/config/autoload/<modulename>.global.php(that path is from the top of the project, not in the module — users of modules shouldn’t ever make changes inside the module directory.)The developer may also want to create
config/autoload/<modulename>.local.phpto override the stuff in the global file. The skeleton application contains a .gitignore file that causes .local.php config files to be ignored. This helps solve juggling configuration between development/staging/production and works nicely with various deployment systems.For a slightly more expansive explanation of this stuff, see this blog post