Doctrine\MongoDB\Query\Expr::where PHP Method

where() public method

Specify a JavaScript expression to use for matching documents.
See also: Builder::where()
See also: http://docs.mongodb.org/manual/reference/operator/where/
public where ( string | MongoCode $javascript )
$javascript string | MongoCode
    public function where($javascript)
    {
        $this->query['$where'] = $javascript;
        return $this;
    }

Usage Example

示例#1
0
 /**
  * Specify a JavaScript expression to use for matching documents.
  *
  * @see Expr::where()
  * @see http://docs.mongodb.org/manual/reference/operator/where/
  * @param string|\MongoCode $javascript
  * @return self
  */
 public function where($javascript)
 {
     $this->expr->where($javascript);
     return $this;
 }