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

mod() public method

Specify $mod criteria for the current field.
See also: Builder::mod()
See also: http://docs.mongodb.org/manual/reference/operator/mod/
public mod ( float | integer $divisor, float | integer $remainder )
$divisor float | integer
$remainder float | integer
    public function mod($divisor, $remainder = 0)
    {
        return $this->operator('$mod', [$divisor, $remainder]);
    }

Usage Example

Example #1
0
 /**
  * Specify $mod criteria for the current field.
  *
  * @see Expr::mod()
  * @see http://docs.mongodb.org/manual/reference/operator/mod/
  * @param float|integer $divisor
  * @param float|integer $remainder
  * @return self
  */
 public function mod($divisor, $remainder = 0)
 {
     $this->expr->mod($divisor, $remainder);
     return $this;
 }