Skip to content
Snippets Groups Projects
Commit 1ce05327 authored by Mantas Marcinkevičius's avatar Mantas Marcinkevičius
Browse files

added the general pipeline agg logic to the abstraction

parent 130c227e
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,48 @@
namespace ONGR\ElasticsearchDSL\Aggregation\Pipeline;
use ONGR\ElasticsearchDSL\Aggregation\AbstractAggregation;
use ONGR\ElasticsearchDSL\Aggregation\Type\MetricTrait;
abstract class AbstractPipelineAggregation extends AbstractAggregation
{
use MetricTrait;
}
\ No newline at end of file
/**
* @var string
*/
private $bucketsPath;
/**
* @param string $name
* @param $bucketsPath
*/
public function __construct($name, $bucketsPath)
{
parent::__construct($name);
$this->setBucketsPath($bucketsPath);
}
/**
* @return string
*/
public function getBucketsPath()
{
return $this->bucketsPath;
}
/**
* @param string $bucketsPath
*/
public function setBucketsPath($bucketsPath)
{
$this->bucketsPath = $bucketsPath;
}
/**
* {@inheritdoc}
*/
public function getArray()
{
return ['buckets_path' => $this->getBucketsPath()];
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment