Download the PHP package phrity/config without Composer
On this page you can find all versions of the php package phrity/config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phrity/config
More information about phrity/config
Files in phrity/config
Package config
Short Description Configuration interface, class, and factories
License MIT
Homepage https://phrity.sirn.se/net-uri
Informations about the package config
Introduction
Tools for handling configuration. Interfaces, implementation class, various readers and a factory.
Installation
Install with Composer;
The ConfigurationInterface interface
The Phrity\Config\ConfigurationInterface extends
PSR-11 ContainerInterface and
JsonSerializable interfaces.
The Configuration class
The Phrity\Config\Configuration class implements the ConfigurationInterface.
Accessing by path
Specifying default
Type coercion
See Transformers for coerscion options.
Any coercion not specified will cause a CoercionException.
Merging configurations
The Reader classes
A number of configuration readers are available.
- DataReader - Reader for PHP data input
- EnvReader and EnvFileReader - Readers for ENV input (file reader requires
symfony/dotenv) - JsonReader and JsonFileReader - Readers for JSON input
- NeonReader and NeonFileReader - Reader for NEON input (requires
nette/neon) - YamlReader and YamlFileReader - Readers for YAML input (requires
symfony/yaml)
The ConfigurationFactory class
The Phrity\Config\ConfigurationFactory provides shortcuts to create and merge configurations.
Versions
| Version | PHP | |
|---|---|---|
1.5 |
^8.1 |
Readers (neon, neon-file), improved transformer |
1.4 |
^8.1 |
Transfomers |
1.3 |
^8.1 |
Coerce option |
1.2 |
^8.1 |
Reader (data), all file-readers get optional option |
1.1 |
^8.1 |
Readers (yaml, env-file) |
1.0 |
^8.1 |
Interface, implementation, readers (json, json-file, yaml-file, env), factory |
All versions of config with dependencies
ext-json Version *
phrity/util-accessor Version ^1.3
phrity/util-transformer Version ^1.2.1
psr/container Version ^1.0 || ^2.0