rezzza / bitter-bundle
Implements a powerful analytics Symfony Bundle based on Bitter library using Redis bitmaps
Installs: 2 209
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 6
Forks: 5
Open Issues: 2
Type:symfony-bundle
Requires
- php: >=5.3.3
- free-agent/bitter: 1.1.*
- symfony/framework-bundle: 2.*
Requires (Dev)
- atoum/atoum-bundle: dev-master
Suggests
- ext-phpredis: Redis C extension for PHP
- snc/redis-bundle: Redis bundle for Symfony 2
This package is not auto-updated.
Last update: 2024-12-21 15:24:07 UTC
README
BitterBundle makes it easy to use the Bitter library to implement real-time highly-scalable analytics using Redis bitmaps in your Symfony 2 project. Please see the Bitter library website for more info and documentation about this project.
Installation
Use Composer to install: rezzza/bitter-bundle
.
In your composer.json
you should have:
{ "require": { "rezzza/bitter-bundle": "*" } }
Then update your AppKernel.php
to register the bundle with:
new Rezzza\BitterBundle\RezzzaBitterBundle()
Bitter uses Redis (version >=2.6).
Configuration
Using SncRedisBundle redis client:
rezzza_bitter: redis_client: snc_redis.default
Using custom redis client:
rezzza_bitter: redis_client: your.very.best.redis.client
You can also configure custom values for prefix_key
and expire_timeout
:
rezzza_bitter: redis_client: snc_redis.default prefix_key: my_app # default - bitter expire_timeout: 300 # default - 60
Basic usage
Get Bitter:
$bitter = $this->container->get('rezzza.bitter');
Mark user 123 as active and has played a song:
$bitter->mark('active', 123); $bitter->mark('song:played', 123);
Note
Please look at Bitter for all examples.
Todo
- Add dashboard controller.
- Add tests