rogerthomas84/php-config-dot-notation
Composer 安装命令:
composer require rogerthomas84/php-config-dot-notation
包简介
Interact with config using a dot notation
README 文档
README
Get and set config from an array using a dot notation.
Usage:
Create the config:
<?php $config = [ 'app' => [ 'name' => 'Foo Bar', 'version' => 1 ] ]; \ConfigDot\Config::setConfig($config);
Get a value:
<?php // set the config as above $appName = \ConfigDot\Config::get('app.name'); // $appName = string(7) "Foo Bar" (or null if it does not exist)
Check if a value exists:
<?php // set the config as above if (\ConfigDot\Config::has('app.name')) { // it does! }
Set a new config value:
Setting a new config value doesn't eliminate the original value, but the order of priority will dictate that the new
value will be returned from a get request.
<?php // set the config as above \ConfigDot\Config::update('app.name', 'Wolf');
统计信息
- 总下载量: 34
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Proprietary
- 更新时间: 2022-01-13