for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the ONGR package.
*
* (c) NFQ Technologies UAB <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ONGR\ElasticsearchDSL\Aggregation;
use ONGR\ElasticsearchDSL\Aggregation\AbstractAggregation;
class RawAggregation extends AbstractAggregation
{
/**
* @var string
private $type;
* @var array
private $body;
* Inner aggregations container init.
* @param string $type
* @param string $name
* @param array $body
public function __construct($type, $name, $body)
$this->type = $type;
parent::__construct($name);
if (isset($body['aggregations'])) {
foreach ($body['aggregations'] as $aggregation) {
$this->addAggregation($aggregation);
}
unset($body['aggregations']);
$this->body = $body;
* {@inheritdoc}
public function getType()
return $this->type;
protected function supportsNesting()
return true;
protected function getArray()
return $this->body;