Skip to content
Snippets Groups Projects
Commit 9be02f7b authored by Simonas Šerlinskas's avatar Simonas Šerlinskas Committed by GitHub
Browse files

Merge pull request #143 from einorler/abstract_pipeline_aggregation

Added abstract pipeline aggregation
parents c03205d3 1ce05327
No related branches found
No related tags found
No related merge requests found
<?php
namespace ONGR\ElasticsearchDSL\Aggregation\Pipeline;
use ONGR\ElasticsearchDSL\Aggregation\AbstractAggregation;
use ONGR\ElasticsearchDSL\Aggregation\Type\MetricTrait;
abstract class AbstractPipelineAggregation extends AbstractAggregation
{
use MetricTrait;
/**
* @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