ytake / hh-config-aggregator
Aggregate and merge configuration
Fund package maintenance!
ytake
Installs: 667
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Language:Hack
Requires
- hhvm: ^4.62
- hhvm/hhvm-autoload: ^3.0
- hhvm/hsl: ^4.0
- hhvm/hsl-experimental: ^4.25
Requires (Dev)
- facebook/fbexpect: ^2.7.3
- hhvm/hacktest: ^2.0.0
- hhvm/hhast: ^4.0.0
README
Aggregates and merges configuration, Supports caching for fast bootstrap in production environments.
zendframework/zend-config-aggregator converted for hack
Installation
$ composer require ytake/hh-config-aggregator
Usage
use type Ytake\HHConfigAggreagator\ArrayProvider; use type Ytake\HHConfigAggreagator\ConfigAggreagator; use type Ytake\HHConfigAggreagator\PhpFileProvider; $aggregator = new ConfigAggreagator( vec[ new PhpFileProvider( __DIR__.'/resources/config/{{,*.}global,{,*.}local}.{hack,hackpartial}', ), new ArrayProvider(['config_cache_enabled' => true]) ], __DIR__.'/resources/cached.config.cache.hackpartial' ); $aggregator->getMergedConfig();