Download the PHP package chilimatic/config-component without Composer
On this page you can find all versions of the php package chilimatic/config-component. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chilimatic/config-component
More information about chilimatic/config-component
Files in chilimatic/config-component
Package config-component
Short Description config component within the chilimatic framework
License MIT
Informations about the package config-component
config-component
chilimatic config-component
The File Object is built for multi-domain architectures:
The idea is pretty simple you create a config directory, every config file has the extension the object will created a list based on the given host_id of the server. if no host_id is set as parameter it will try to determinate the id via or it will try to look for the parameter use from the cli
if still no host_id is found it will throw an exception.
It will than generate a set of possible configs based on the delimiter, the delimiter is by default you can switch it to for windows machines.
the generated set in our case would look as follows:
as mentioned you can change the delimiter for windows machines to
the *.cfg will be used on every system, and than it will be overwritten hierarchical
The values are stored in a doublylinked-list so all values do remain but in general the config returns the last appended value to a specific key
the config implements its own parser which allows you to write configs like
comments are defined as and will be added to the node;
The library includes a standard factory pattern that can be accessed static
As well as a singelton config wrapper which utilizes the factory to create a config that allows you static access.
you can have a look at the benchmark.php and the unit tests.
if you just wanna uses ini files you can use the ini adapter
if you just pass a directory it will scan for all files with an extension It will merge them recursive based on the scanned order. and than pass it to the node graph structure inside of the config object
if you pass a specific file it will only use this file.
Planned for the next steps are new engines right now it's a dom like structure with indexes
this can be overkill and maybe other people prefer a flat hashmap structure.
Maybe a json adapter will be cool too.
All versions of config-component with dependencies
chilimatic/interfaces-component Version 2.*
chilimatic/datastructure-component Version 2.*