Download the PHP package rstgroup/zf-external-config-module without Composer

On this page you can find all versions of the php package rstgroup/zf-external-config-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zf-external-config-module

ZF External Config Module

This module provides the logic and abstraction for loading and merging application's configuration from external sources.

The module itself does not have any external provider yet, providers can be installed via Composer or written it your application's code.

Installation

Require module with Composer:

The next step is adding module to ZF system configuration (config/application.config.php):

Adding providers

To load configuration from external source, the providers should be registered in your app's configuration:

The module skims through enabled providers defined in: ` and creates them using Inner Service Manager.

Enabling and disabling providers

Disabled providers, even though they are defined, don't participate in creation of final configuration.

Here's an example how to mark defined provider enabled or disabled:

Inner Service Manager

In the example above you can see service_manager definition.

The module attaches itself to the configuration merge process, thus the application's default ServiceManager is not yet available. In order to keep the service manager's functionality, zf-external-config-module creates its own manager!

Your service can be created by factory, can be declared invokable etc. - the same way you normally declare services.

But remember, this service ends its life just after external configuration is loaded and merged!

Passing configuration to your providers

When defining your own providers you might require to pass some credentials or other parameters into the provider instance. To do so - the best way is to use factory functionality, because factories have the (inner) service manager injected!

Inner Service Manager has the application configuration and zf-external-config-module's configuration registered as services:

Note that the rst_group.external_config key is removed from application's configuration, but you can still get it using module's config.

Writing your own provider

External config providers have to implement \RstGroup\ZfExternalConfigModule\Config\ConfigProviderInterface and be registered in module and inner service manager. Those are the only requirements!

You can store the code in your own application's codebase, but we recommend to share it with the community and publish it on GitHub & Composer :) We'll gladly add your provider to this package's suggested providers!

Suggested providers

Consul KV Storage: rstgroup/zf-external-config-consul-provider


All versions of zf-external-config-module with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7
zendframework/zend-modulemanager Version ^2.7
zendframework/zend-servicemanager Version ^3.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rstgroup/zf-external-config-module contains the following files

Loading the files please wait ....