Download the PHP package time2split/time2configure without Composer

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

Time2Configure

License: MIT Latest Stable Version Latest Unstable Version

Time2Configure is a php library implementing the concept of tree configuration with value interpolations.

Configuring a program consists to get some entries from the external world, for instance by entering some command line arguments, and then to use theses entries inside the program. Most of the time, the program does the reading of a formatted configuration (json, ini, etc) with some specialized format reader and then uses directly the obtained result as the program configuration. Usefull formats for configuration storage may be json, php array, or other tree shapped formats. Even a flat format like ini or csv can allows the usage of a hierarchical notation (eg. ) that finally defines a tree-shapped configuration. Tree is a natural way to represent a configuration.

Time2Configure proposes a general abstraction of tree configuration, not focused on any format but rather on storage and features. Moreover, these tree configurations have the very usefull ability to use complex value interpolation languages.

Installation

The library is distributed as a Composer project.

Documentation

Some examples

To have a very first taste of the library in action let's give a first example:

Because the configuration is a tree we are able reduce the visibility of some part of a program to a specific sub-tree.

The library consider that each node of the tree can store a value, not only leaves.

Value interpolation

The second main feature, over the tree aspect is the value interpolation.

Value interpolation permits to compile automatically an entries's value to generate dynamically another value when the entry is accessed. Here is an example using the previous example's $config:

In this example we used the provided interpolator Interpolators::recursive() which substitute every ${key} token encountered in a text value by the actual $config['key'] value stored. (For now, this is the only interpolator provided by the library.)

More complex interpolated language can be made. For instance, the pcp project defines a more complex language with the help of the great parsica-php/parsica project. The [pcp interpolated language]() permits to use operators based expressions (assignments, boolean) and is even able to parse command line arguments.

The interpolation principe is simple, but let the ability to create very complex languages.

Features

Hierarchy of configurations

In many scenarios there is a default base configuration that the user can modify to create the final one. Time2Configure provides a solution to create a list of configurations where only the last one can be effectively modified.

More generally, this is a very usefull feature that permits to a process to immunize its configuration against modification by a sub-process without the need of copying.

Decorators

Decorators are usefull to add more behaviour to a configuration. Fo instance, the decorator Configurations::doOnRead() is able to do an action when a value is accessed.

There is also some mapping decorators that can uses the original entry values to makes new one. Here is a new examples:


All versions of time2configure with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
time2split/time2help Version >=1.0-alpha < 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 time2split/time2configure contains the following files

Loading the files please wait ....