Download the PHP package phpnomad/json-config-integration without Composer
On this page you can find all versions of the php package phpnomad/json-config-integration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package json-config-integration
phpnomad/json-config-integration
phpnomad/json-config-integration wires JSON-file-backed configuration into a PHPNomad application. It binds the strategies from phpnomad/array-json-config to the interfaces defined in phpnomad/config, then registers a set of JSON files against ConfigService during the loader bootstrap. Install this package when you want configuration values stored in JSON files on disk and accessible anywhere via dot-notation keys.
Installation
What This Provides
- A single
ConfigInitializerclass that bindsArrayConfigStrategytoConfigStrategyandJsonFileLoadertoConfigFileLoaderStrategyin the DI container. - During
load(), it walks the constructor-supplied['namespace' => '/path/to/file.json']map and callsConfigService::registerConfig()for each entry, so every file is parsed and indexed in one pass. - Implementations of
HasClassDefinitions,Loadable, andCanSetContainer, so the initializer drops into anyphpnomad/loaderbootstrap sequence without extra glue.
Requirements
phpnomad/configphpnomad/array-json-configphpnomad/di^2.0phpnomad/loader^1.0 || ^2.0
Usage
Register the initializer with your application's bootstrapper and hand it a map of namespace keys to JSON file paths.
Each file is parsed once during load() and its contents are stored under the namespace key you provided, so consumers read values through ConfigService without re-reading the filesystem.
Documentation
Full documentation for PHPNomad lives at phpnomad.com.
License
MIT. See LICENSE.
All versions of json-config-integration with dependencies
phpnomad/di Version ^2.0
phpnomad/loader Version ^1.0 || ^2.0
phpnomad/array-json-config Version ^1.0