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

Merge pull request #157 from einorler/filter_agg_getter

Added a getter for a filter in filter aggregation
parents 23913d14 a48c2a6a
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,16 @@ class FilterAggregation extends AbstractAggregation ...@@ -54,6 +54,16 @@ class FilterAggregation extends AbstractAggregation
$this->filter = $filter; $this->filter = $filter;
} }
/**
* Returns a filter.
*
* @return BuilderInterface
*/
public function getFilter()
{
return $this->filter;
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
...@@ -71,7 +81,7 @@ class FilterAggregation extends AbstractAggregation ...@@ -71,7 +81,7 @@ class FilterAggregation extends AbstractAggregation
throw new \LogicException("Filter aggregation `{$this->getName()}` has no filter added"); throw new \LogicException("Filter aggregation `{$this->getName()}` has no filter added");
} }
return $this->filter->toArray(); return $this->getFilter()->toArray();
} }
/** /**
......
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