fieg / statistico-bundle
Installs: 64 999
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- fieg/statistico: ^2.0
- symfony/config: ^3.0|^4.0|^5.0
- symfony/console: ^3.0|^4.0|^5.0
- symfony/dependency-injection: ^3.0|^4.0|^5.0
- symfony/http-kernel: ^3.0|^4.0|^5.0
Requires (Dev)
- phpunit/phpunit: ^6.0
README
Wrapper bundle for the Statistico library.
Installation
Using composer:
composer require fieg/statistico-bundle:dev-master
Add to AppKernel.php
:
$bundles = [ new Fieg\StatisticoBundle\FiegStatisticoBundle(), ];
Configuration in app/config/config.yml
:
fieg_statistico: driver: redis: client: 'your_redis_service'
Usage
Inject statistico into some service:
some_service: class: Acme\SomeService arguments: [@statistico]
Usage:
namespace Acme; class SomeService { public function __construct(Statistico $statistico) { $this->statistico = $statistico; } public function someAction() { $this->statistico->increment('some.statistic.indentitier'); // increases the statistic with 1 } }