snproject/bitter-bundle

实现了基于Bitter库和Redis位图的强大分析功能Symfony Bundle

安装: 13

依赖者: 0

建议者: 0

安全: 0

星级: 1

观察者: 2

分支: 5

类型:symfony-bundle

1.0.0 2014-12-01 13:42 UTC

This package is not auto-updated.

Last update: 2024-09-24 07:52:37 UTC


README

https://secure.travis-ci.org/rezzza/BitterBundle.png?branch=master https://insight.sensiolabs.com/projects/15882c8a-0875-4153-bc00-603e7cee2ab0/mini.png

BitterBundle 使您能够轻松使用 Bitter库 在您的Symfony 2项目中实现基于Redis位图的高可扩展性实时分析。请参阅 Bitter库网站 了解更多信息和此项目的文档。

安装

使用 Composer 安装: rezzza/bitter-bundle

在您的 composer.json 中应包含

{
    "require": {
        "rezzza/bitter-bundle": "*"
    }
}

然后更新您的 AppKernel.php 以注册该bundle

new Rezzza\BitterBundle\RezzzaBitterBundle()

Bitter 使用 Redis (版本 >=2.6)。

配置

使用 SncRedisBundle Redis客户端

rezzza_bitter:
    redis_client: snc_redis.default

使用自定义Redis客户端

rezzza_bitter:
    redis_client: your.very.best.redis.client

您还可以为 prefix_keyexpire_timeout 配置自定义值

rezzza_bitter:
    redis_client: snc_redis.default
    prefix_key: my_app  # default - bitter
    expire_timeout: 300 # default - 60

基本用法

获取Bitter

$bitter = $this->container->get('rezzza.bitter');

标记用户123为活跃且已播放歌曲

$bitter->mark('active', 123);
$bitter->mark('song:played', 123);

注意

请参阅 Bitter 以获取所有示例。

待办事项

  • 添加仪表板控制器。
  • 添加测试