devsdmf / silex-zend-cache-provider
用于Zend Cache库的Silex服务提供者
1.1.0
2015-01-12 19:08 UTC
Requires
- zendframework/zend-cache: 2.3.*
Requires (Dev)
- fabpot/php-cs-fixer: 0.5.*
- phpunit/phpunit: 4.2.*
- silex/silex: ~2.0@dev
This package is auto-updated.
Last update: 2024-09-11 14:26:19 UTC
README
这是一个准备将Zend\Cache库集成到Silex框架中的服务提供者。
安装
将以下依赖项添加到您的项目中的composer.json文件
{ "require": { "devsdmf/silex-zend-cache-provider": "1.1.0" } }
使用方法
use Silex\Application; use Silex\Provider\ZendCacheServiceProvider; $app = new Application(); // Your application setup $app->register(new ZendCacheServiceProvider(), array( 'cache.options'=>array( 'zendcache'=>array( 'factory'=>array( // Your ZendCache factory configuration ), 'options'=>array( // Your options for ZendCache ), ), ), )); // Using cache $app['cache'];
配置
有关配置和选项的更多信息,请参阅官方Zend Cache文档。
测试
要运行测试套件,您需要安装require-dev
$ composer install --dev
$ ./vendor/bin/phpunit
许可证
本库采用MIT许可证。