diff --git a/src/Filter/PostFilter.php b/src/Filter/PostFilter.php deleted file mode 100644 index b085e3be1ce7b18229ca2d554ee76e012e60fcb8..0000000000000000000000000000000000000000 --- a/src/Filter/PostFilter.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php - -/* - * This file is part of the ONGR package. - * - * (c) NFQ Technologies UAB <info@nfq.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace ONGR\ElasticsearchDSL\Filter; - -use ONGR\ElasticsearchDSL\BuilderInterface; - -/** - * Represents Elasticsearch "post_filter" filter. - * - * @link http://www.elastic.co/guide/en/elasticsearch/guide/current/_post_filter.html - */ -class PostFilter implements BuilderInterface -{ - /** - * @var BuilderInterface - */ - private $filter; - - /** - * Sets a filter. - * - * @param BuilderInterface $filter - */ - public function __construct(BuilderInterface $filter = null) - { - if ($this->filter !== null) { - $this->setFilter($filter); - } - } - - /** - * Checks if bool filter is relevant. - * - * @return bool - * - * @deprecated Will be removed in 1.0. Use getFilter() method. - */ - public function isRelevant() - { - return isset($this->filter); - } - - /** - * Returns filter. - * - * @return BuilderInterface - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Sets filter. - * - * @param BuilderInterface $filter - */ - public function setFilter(BuilderInterface $filter) - { - $this->filter = $filter; - } - - /** - * {@inheritdoc} - */ - public function toArray() - { - return [$this->getFilter()->getType() => $this->getFilter()->toArray()]; - } - - /** - * {@inheritdoc} - */ - public function getType() - { - return 'post_filter'; - } -}