Skip to content
Snippets Groups Projects
Bool.php 999 B
Newer Older
ONGR Team's avatar
ONGR Team committed
<?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\ElasticsearchBundle\DSL\Bool;

use ONGR\ElasticsearchBundle\DSL\BuilderInterface;
use ONGR\ElasticsearchBundle\DSL\Query\BoolQuery;
ONGR Team's avatar
ONGR Team committed

/**
 * Bool operator. Can be used for filters and queries.
 *
 * @deprecated Will be removed in 1.0. Use ONGR\ElasticsearchBundle\DSL\Query\BoolQuery.
ONGR Team's avatar
ONGR Team committed
 */
class Bool extends BoolQuery
ONGR Team's avatar
ONGR Team committed
{
    /**
     * Add BuilderInterface object to bool operator.
ONGR Team's avatar
ONGR Team committed
     *
     * @param BuilderInterface $bool
     * @param string           $type
     *
     * @throws \UnexpectedValueException
     *
     * @deprecated Will be removed in 1.0. Use ONGR\ElasticsearchBundle\DSL\Query\BoolQuery::add().
ONGR Team's avatar
ONGR Team committed
     */
    public function addToBool(BuilderInterface $bool, $type = BoolQuery::MUST)
ONGR Team's avatar
ONGR Team committed
    {
        $this->add($bool, $type);
ONGR Team's avatar
ONGR Team committed
    }
}