caseSensitive() public method

This method must be called after text().
See also: Builder::caseSensitive()
See also: http://docs.mongodb.org/manual/reference/operator/text/
Since: 1.3
public caseSensitive ( boolean $caseSensitive )
$caseSensitive boolean
Exemplo n.º 1
0
 /**
  * A boolean flag to enable or disable case sensitive search for $text
  * criteria.
  *
  * This method must be called after text().
  *
  * @see Expr::caseSensitive()
  * @see http://docs.mongodb.org/manual/reference/operator/text/
  * @param bool $caseSensitive
  * @return $this
  * @throws BadMethodCallException if the query does not already have $text criteria
  *
  * @since 1.3
  */
 public function caseSensitive($caseSensitive)
 {
     $this->expr->caseSensitive($caseSensitive);
     return $this;
 }
Exemplo n.º 2
0
 /**
  * @expectedException BadMethodCallException
  */
 public function testCaseSensitiveRequiresTextOperator()
 {
     $expr = new Expr();
     $expr->caseSensitive('en');
 }