starbug / config
配置数据加载器。
v0.9.1
2022-12-17 06:09 UTC
Requires
- starbug/resource-locator: ^0.9.1
Requires (Dev)
- starbug/devel: ^1.0
README
假设您有以下模块目录。
app/modules/example1
app/modules/example2
同时假设您在这些模块中有以下 yml 文件。
app/modules/example1/etc/test.yml
app/modules/example2/etc/test.yml
use Starbug\Config\Config; $config = new Config($locator); $data = $config->get("test"); // $data will contain the merged data from both files var_dump($data);
有关传递给 Config 构造函数的定位器详细信息,请参阅starbug-resource-locator。