ytake / hh-config-aggregator
聚合和合并配置
0.10.0
2020-06-26 06:10 UTC
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
聚合和合并配置,支持缓存以加快生产环境中的快速启动。
zendframework/zend-config-aggregator 转换为 Hack
安装
$ composer require ytake/hh-config-aggregator
使用
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();