getQuery() public method

Return the query criteria.
See also: Builder::getQueryArray()
public getQuery ( ) : array
return array
Beispiel #1
0
 public function testDiacriticSensitiveFalseRemovesOption()
 {
     $expr = new Expr();
     $expr->text('foo');
     $expr->diacriticSensitive(true);
     $expr->diacriticSensitive(false);
     $this->assertEquals(array('$text' => array('$search' => 'foo')), $expr->getQuery());
 }
Beispiel #2
0
 /**
  * Negates an expression for the current field.
  *
  * @see Builder::not()
  * @see http://docs.mongodb.org/manual/reference/operator/not/
  * @param array|Expr $expression
  * @return $this
  */
 public function not($expression)
 {
     return $this->operator('$not', $expression instanceof Expr ? $expression->getQuery() : $expression);
 }
Beispiel #3
0
 /**
  * Return the expression's query criteria.
  *
  * @see Expr::getQuery()
  * @return array
  */
 public function getQueryArray()
 {
     return $this->expr->getQuery();
 }
Beispiel #4
0
 /**
  * {@inheritdoc}
  */
 public function getExpression()
 {
     return ['$match' => $this->query->getQuery()];
 }
Beispiel #5
0
 /**
  * {@inheritdoc}
  */
 public function getExpression()
 {
     return array('$match' => $this->query->getQuery());
 }
 private function buildGetEntityIdForTermQuery(Term $term)
 {
     $expr = new Expr();
     $expr->field('sterms.' . $term->getLanguageCode())->equals($this->documentBuilder->cleanTextForSearch($term->getText()));
     return $expr->getQuery();
 }