skaffold / configuration
一个简单的配置仓库。
v0.1.0
2020-12-29 21:04 UTC
Requires
- atomastic/arrays: ^2.2
Requires (Dev)
- phpunit/phpunit: ^9.5
- vimeo/psalm: ^4.3
This package is auto-updated.
Last update: 2024-08-29 05:30:41 UTC
README
配置仓库是一个简单的类和合约,用于处理获取和设置配置数据。
安装
composer require skaffold/configuration
开始使用
配置仓库接受一个可选的初始配置键数组。从那里,你有多达几种方法来帮助你与配置数据交互。以下列出。
use Skaffold\Configuration\ConfigurationRepository; $config = new ConfigurationRepository; // Sets "key" to the value of "value" $config->set('key', 'value'); // Attempts to get "key" if it is not found, defaults to "Some default value" over null $config->get('key', 'Some default value'); // Deletes the specified key from the repository $config->delete('key'); // Retrieves all the values from the repository $config->all(); // Removes all the keys from the repository $config->flush();