Download the PHP package labcoding/merge-module-config without Composer
On this page you can find all versions of the php package labcoding/merge-module-config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download labcoding/merge-module-config
More information about labcoding/merge-module-config
Files in labcoding/merge-module-config
Package merge-module-config
Short Description ZF2 module for automated merging config files in modules
License MIT
Homepage https://github.com/labcoding/MergeModuleConfig
Informations about the package merge-module-config
ZF2 MergeModuleConfig module
This module automated merging config files in modules.
All *.php
files in ModuleName/config/autoload
folder will be merged automatically.
If you have many "....config.php" files in one module, for sample:
- route.config.php - service_manger.config.php - controller.config.php
Marge Module Config merged all files in config/autoload
folder, and you don't need to write some like this
Problem
You have some similar file structure:
Application
- config
- module.config.php
- route.config.php
- service_manger.config.php
- controller.config.php
- ....
and some similar code in module.config.php file:
Solution
After including LabCoding\MergeModuleConfig
your code in module.config.php file will look like:
and file structure config folder change to:
Application
- config
- autoload
- route.config.php
- service_manger.config.php
- controllers.config.php
- module.config.php
- autoload
- ....
Installation
Add this project in your composer.json:
Now tell composer to download library by running the command:
OR
Run command in console
Post installation
Enabling it in your application.config.php
file.
Add config/autoload
folder and place it in the configuration files.
All *.php
files in ModuleName/config/autoload
folder will be merged automatically.