featuretoggle/lib-php
Composer 安装命令:
composer require featuretoggle/lib-php
包简介
PHP Library to use Feature Toggle services
关键字:
README 文档
README
A PHP client library for interacting with featuretoggle.com. This library is under active development and is likely to change frequently. Bug reports and pull requests are welcome.
Installation
Install with Composer
php composer.phar require featuretoggle/lib-php
Usage
require 'vendor/autoload.php'; // Create a new FTClient with your customer and environment API key's $featuretoggle = new FeatureToggle\FTClient('customerKey', 'environmentKey', array('options')); // Get features $features = $featuretoggle->getFeatures(); // Check feature status $enabled = $featuretoggle->isEnabled('feature_key'); if($enabled) { // Feature is enabled, do something } else { // Feature is disabled, do something else }
Configuration Options
The library caches responses from received the Feature Toggle API locally to limit the number of requests. The default cache timeout is 300 seconds (5 minutes). You can adjust the cache timeout by providing the 'cache_timeout' config option when initializing the library.
array( 'cache_timeout' => SECONDS, // optional, defaults to 300 seconds )
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/featuretoggle/lib-php.
License
The library is available as open source under the terms of the MIT License.
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-11