lib/Doctrine/MongoDB/Query/Expr.php
public function currentDate($type = 'date')
    {
        if (! in_array($type, ['date', 'timestamp'])) {
            throw new InvalidArgumentException('Type for currentDate operator must be date or timestamp.');
        }

        $this->requiresCurrentField();
        $this->newObj['$currentDate'][$this->currentField]['$type'] = $type;
        return $this;
    }
public function currentDate($type = 'date')
    {
        if (! in_array($type, ['date', 'timestamp'])) {
            throw new InvalidArgumentException('Type for currentDate operator must be date or timestamp.');
        }

        $this->requiresCurrentField();
        $this->newObj['$currentDate'][$this->currentField]['$type'] = $type;
        return $this;
    }
public function currentDate ( $ type = 'date' ) { if ( ! in_array ( $ type , [ 'date' , 'timestamp' ] ) ) { throw new InvalidArgumentException ( 'Type for currentDate operator must be date or timestamp.' ) ; } $ this -> requiresCurrentField ( ) ; $ this -> newObj [ '$currentDate' ] [ $ this -> currentField ] [ '$type' ] = $ type ; return $ this ; }
Sets the value of the current field to the current date, either as a date or a timestamp.

@see Builder::currentDate()
@see http://docs.mongodb.org/manual/reference/operator/update/currentDate/
@param string $type
@return $this
@throws InvalidArgumentException if an invalid type is given
Sets the value of the current field to the current date either as a date or a timestamp .