devsdmf/silex-zend-cache-provider

用于Zend Cache库的Silex服务提供者

1.1.0 2015-01-12 19:08 UTC

This package is auto-updated.

Last update: 2024-09-11 14:26:19 UTC


README

构建状态最新稳定版本总下载量许可证 SensioLabsInsight

这是一个准备将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许可证。