Download the PHP package sandrokeil/easy-config without Composer
On this page you can find all versions of the php package sandrokeil/easy-config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sandrokeil/easy-config
More information about sandrokeil/easy-config
Files in sandrokeil/easy-config
Package easy-config
Short Description Zend Framework 2 (zf2) module to retrieve specific module options and provides some abstract factories to create easily instances depending on configuration
License BSD-3-Clause
Homepage https://github.com/sandrokeil/EasyConfig
Informations about the package easy-config
EasyConfig module for Zend Framework 2
You want to configure your factories via your module config?
You want to configure option classes via module config for your plugin manager?
You want to add other services via module config to a factory?
This module comes to the rescue!
EasyConfig provides some abstract factories and some interfaces to easily create instances depending on configuration or retrieve specified module options.
- Well tested. Besides unit test and continuous integration/inspection this solution is also ready for production use.
- Great foundations. Based on Zend Framework 2
- Every change is tracked. Want to know whats new? Take a look at CHANGELOG.md
- Listen to your ideas. Have a great idea? Bring your tested pull request or open a new issue.
You should have coding conventions and you should have config conventions. If not, you should think about that.
The module config keys should have the following structure module.scope.name
. A common configuration looks like that:
So doctrine
is the module, connection
is the scope and orm_default
is the name. After that the specified instance options follow.
With docs for a detailed explanation.
Installation
Installation of this module uses composer. For composer documentation, please refer to getcomposer.org.
Put the following into your composer.json
{
"require": {
"sandrokeil/easy-config": "~1.0"
}
}
It is not necessary to add this module to your config/application.config.php
.
Documentation
You can find documentation about the usages of factories at the following links:
- Configurable - Get an options class or an array of options and with mandatory options check
- ConstructorOptionConfig - Inject options via constructor
- OptionHydratorConfig - Inject options with a hydrator
- ServiceConfig - Inject an other service to instance
- ServiceManagerConfig - Inject Options to a service plugin manager
- ServiceOptionConfig - Inject one or more services