PHP code example of fieg / statistico-bundle

1. Go to this page and download the library: Download fieg/statistico-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fieg / statistico-bundle example snippets


$bundles = [
  new Fieg\StatisticoBundle\FiegStatisticoBundle(),
];

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
    }
}