public function aggregate($aggregation) { if (is_array($aggregation)) { foreach ($aggregation as $aggregationItem) { $this->aggregate($aggregationItem); } } else { $this->_parts['aggregations'][] = $aggregation; } return $this; }