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

comment() public method

Associates a comment to any expression taking a query predicate.
See also: Builder::comment()
See also: http://docs.mongodb.org/manual/reference/operator/query/comment/
public comment ( string $comment )
$comment string
    public function comment($comment)
    {
        $this->query['$comment'] = $comment;
        return $this;
    }

Usage Example

Esempio n. 1
0
 /**
  * Associates a comment to any expression taking a query predicate.
  *
  * @see Expr::comment()
  * @see http://docs.mongodb.org/manual/reference/operator/query/comment/
  * @param string $comment
  * @return self
  */
 public function comment($comment)
 {
     $this->expr->comment($comment);
     return $this;
 }