for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Flagbit\Bundle\MetricsBundle\Collector;
use Beberlei\Metrics\Collector\Collector;
class CollectorCollection implements CollectorInterface
{
/**
* @var Collector[]
*/
private $collectors;
* @param Collector $collector
public function addCollector(Collector $collector)
$this->collectors[] = $collector;
}
* {@inheritdoc}
public function increment($variable)
$this->callAll('increment', [$variable]);
public function decrement($variable)
$this->callAll('decrement', [$variable]);
public function timing($variable, $time)
$this->callAll('timing', [$variable, $time]);
public function measure($variable, $value)
$this->callAll('measure', [$variable, $value]);
private function callAll($method, array $arguments)
foreach ($this->collectors as $collector) {
$collector->{$method}(...$arguments);
public function flush()
$collector->flush();