Elastica\Aggregation\AbstractAggregation::addAggregation PHP Метод

addAggregation() публичный Метод

Add a sub-aggregation.
public addAggregation ( AbstractAggregation $aggregation )
$aggregation AbstractAggregation
    public function addAggregation(AbstractAggregation $aggregation)
    {
        if ($aggregation instanceof GlobalAggregation) {
            throw new InvalidException('Global aggregators can only be placed as top level aggregators');
        }
        $this->_aggs[] = $aggregation;
        return $this;
    }