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

mul() public method

If the field does not exist, it will be set to 0.
See also: Builder::mul()
See also: http://docs.mongodb.org/manual/reference/operator/mul/
public mul ( float | integer $value )
$value float | integer
    public function mul($value)
    {
        $this->requiresCurrentField();
        $this->newObj['$mul'][$this->currentField] = $value;
        return $this;
    }

Usage Example

Example #1
0
 /**
  * Multiply the current field.
  *
  * If the field does not exist, it will be set to 0.
  *
  * @see Expr::mul()
  * @see http://docs.mongodb.org/manual/reference/operator/mul/
  * @param float|integer $value
  * @return self
  */
 public function mul($value)
 {
     $this->expr->mul($value);
     return $this;
 }