public function mutate($updateQuery, $options = array())
    {
        if(!is_array($updateQuery)) throw new \Exception('$updateQuery should be an array');
        if(!is_array($options)) throw new \Exception('$options should be an array');

        $default = array(
            'w' => 1
        );
        $options = array_merge($default, $options);

        try {
            $this->_connection->update($this->collectionName(), array('_id' => $this->cleanData['_id']), $updateQuery, $options);
        } catch (\MongoCursorException $e) {
            return false;
        }

        return true;
    }
public function mutate($updateQuery, $options = array())
    {
        if(!is_array($updateQuery)) throw new \Exception('$updateQuery should be an array');
        if(!is_array($options)) throw new \Exception('$options should be an array');

        $default = array(
            'w' => 1
        );
        $options = array_merge($default, $options);

        try {
            $this->_connection->update($this->collectionName(), array('_id' => $this->cleanData['_id']), $updateQuery, $options);
        } catch (\MongoCursorException $e) {
            return false;
        }

        return true;
    }
public function mutate ( $ updateQuery , $ options = array ( ) ) { if ( ! is_array ( $ updateQuery ) ) throw new \ Exception ( '$updateQuery should be an array' ) ; if ( ! is_array ( $ options ) ) throw new \ Exception ( '$options should be an array' ) ; $ default = array ( 'w' => 1 ) ; $ options = array_merge ( $ default , $ options ) ; try { $ this -> _connection -> update ( $ this -> collectionName ( ) , array ( '_id' => $ this -> cleanData [ '_id' ] ) , $ updateQuery , $ options ) ; } catch ( \ MongoCursorException $ e ) { return false ; } return true ; }
Mutate data by direct query

@param array $updateQuery update query
@param array $options options

@throws \Exception
@return boolean
Mutate data by direct query