thiphariel/config-file-loader
Composer 安装命令:
composer require thiphariel/config-file-loader
包简介
Configuration file loader in PHP
README 文档
README
This library is a configuration file loader in PHP that supports JSON and PHP files at the moment.
Requierements
- PHP >=7.1
Installation
composer require thiphariel/config-file-loader
Usage
// Create an instance of Config $config = new Config(); // Load JSON configuration file $config->load("config.json"); // Load PHP configuration file $config->load("config.php"); // Getting values $host = $config->get("host"); $port = $config->get("port"); // Nested keys $env = $config->get("environment.dev");
Examples of configurations can be found in the tests/config folder.
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-27