/**
  * {@inheritDoc}
  */
 public function count(array $sources)
 {
     return $this->aggregator->count($sources);
 }
예제 #2
0
 /**
  * Adds an aggregator with a name to the container
  *
  * @param AggregatorInterface $aggregator Aggregator to add to the container for later processing
  *
  * @throws AggregatorAlreadyExistsException
  */
 function addAggregator(AggregatorInterface $aggregator)
 {
     //Check if the name exists
     if ($this->hasAggregator($aggregator->getName())) {
         throw new AggregatorAlreadyExistsException($aggregator->getName());
     }
     //Add the aggregator to the container
     $this->aggregators[] = $aggregator;
 }