Download the PHP package modus/config without Composer

On this page you can find all versions of the php package modus/config. 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 config

Modus/Config

The Modus/Config package is designed to provide a simple, basic configuration layer and DI container setup mechanism for any project.

Installing

To install this package, run the following command:

Dependencies

This module depends on the phpdotenv project. No other dependencies are installed.

Usage

Using the configuration package is simple.

The package will automatically attempt to load up to three configuration files on each instantiation, based on the following rules:

  1. config.php
  2. The specific environment specified
  3. local.php

For example, if the environment specified is "production", then Modus/Config will load config.php, then production.php, then local.php.

Modus/Config is smart enough to override the early files with later configuration files. So for example, if you load a file with an array key of 'database' set to null, and in a later configuration set that value to the name of your MySQL database, Modus/Config will compile a configuration that contains the correct value.

For example, imagine the two following configuration files:

When Modus/Config evaluates them together, it will create the following configuration:

In addition, Modus/Config is recursive, so multidimensional arrays will be merged correctly.

Environment Variables

Modus/Config allows you to optionally include the PHP Dotenv project, and define environment variables. This is useful for setting server-specific settings like passwords, keys, database names and server locations.


All versions of config with dependencies

PHP Build Version
Package Version
Requires vlucas/phpdotenv Version ^2.0
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 modus/config contains the following files

Loading the files please wait ....