Elastica\Query::getQuery PHP Method

getQuery() public method

Gets the query object.
public getQuery ( ) : Elastica\Query\AbstractQuery
return Elastica\Query\AbstractQuery
    public function getQuery()
    {
        return $this->getParam('query');
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @param \Elastica\Query $query
  *
  * @throws \InvalidArgumentException
  *
  * @return \Elastica\Query\BoolQuery
  */
 protected function getBoolQuery(Query $query)
 {
     $boolQuery = $query->getQuery();
     if (!$boolQuery instanceof BoolQuery) {
         throw new InvalidArgumentException(sprintf('Facet filters available only with %s, got: %s', BoolQuery::class, get_class($boolQuery)));
     }
     return $boolQuery;
 }
All Usage Examples Of Elastica\Query::getQuery