Download the PHP package simplecomplex/config without Composer

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

Config

Simple and sectioned configuration interfaces


is basically PSR-16 Simple Cache without time-to-live.
There's a key and a value.

That principle isn't optimal for general use, unless you like real long and complex key names.


Splits the item key into 'section' plus 'key', facilitating a more organized structure.

The immediate benefit is that you can namespace all items that belong to a particular library.

The section-key pattern can be implemented and utilized in two manners:

Implementations

Environment variable based


is a simple abstraction of server environment variables.


a sectioned implementation, using concatenation.

Ini-files as source, cache as store

The ini-file based classes parse ini-files, and save to cache stores.

They read recursively from their ini-file paths. That allows one to clone and use ini-files from multiple version control repositories.

Ini-files are so old-school...

Aye, but the ini format is less error-prone than JSON, YAML, what-not.
The syntax is so simple it's hard to make mistakes. And operations people are used to ini-files.

Cache layer

is SimpleComplex Cache .
Cache store names are prefixed with

Beware of conflict; do not prefix other cache stores that way.

Types of ini-based configuration

is not sectioned. Simple but probably not that useful.


is a powerful general usage implementation.

Reads ini-files from a base path and an override path.
Keep development/production invariant variables (ini-files) in the base path.
Let operations keep production variables in the override path.

Using the list-principle - and fully supporting and - is optimal for accessing many/all keys of a section within a limited procedure.


a sectioned implementation, using concatenation.

Optimal for types of configuration one expects to access keys of diverse sections in an unpredictable manner, but still want the organisational benefit of sections; many but exact cache reads.
SimpleComplex Locale uses this config class for localized texts.

Abstraction

The **** class is an abstraction of sectioned configuration.

In this package it extends .
In an extending package it could be some other sectioned config implementation.

CLI interface

**** delivers CLI commands for setting, getting and deleting config items.
And commands for refreshing and exporting full configuration stores.

It exposes instances, via the class.
The other config classes are not accessible via CLI.

Global config

defaults to deliver an instance named 'global'.

A typical system could probably benefit from a single config instance for the bulk of items.
Since the whole thing runtime is cache based, there's no performance reason for using multiple instances.

Dependency injection container ID: config

Recommendation: access (and thus instantiate) the global config via DI container ID 'config'.
See SimpleComplex Utils .

Example

CLI commands

Installation

Create a 'conf' directory alongside the document root dir.

Like:



Create 'base' and 'override' paths within the 'conf', like:



For the 'global' config store, place or symlink or git clone your system's
.ini configuration files under the 'base' and 'override' paths
using file extension (= ).

Like:



If that directory structure isn't suitable, do either:

Requirements

Suggestions

All versions of config with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
simplecomplex/utils Version ^1.8 || ^2.0 || dev-develop
simplecomplex/cache Version ^1.3 || dev-develop
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 simplecomplex/config contains the following files

Loading the files please wait ....