src/League/Monga/Query/Update.php
public function getUpdate()
    {
        $update = [];

        foreach ($this->update as $field => $data) {
            list($type, $value) = $data;

            if (! isset($update[$type])) {
                $update[$type] = [];
            }

            $update[$type][$field] = $value;
        }

        if ($this->atomic) {
            $update['$atomic'] = 1;
        }

        return $update;
    }
public function getUpdate()
    {
        $update = [];

        foreach ($this->update as $field => $data) {
            list($type, $value) = $data;

            if (! isset($update[$type])) {
                $update[$type] = [];
            }

            $update[$type][$field] = $value;
        }

        if ($this->atomic) {
            $update['$atomic'] = 1;
        }

        return $update;
    }
public function getUpdate ( ) { $ update = [ ] ; foreach ( $ this -> update as $ field => $ data ) { list ( $ type , $ value ) = $ data ; if ( ! isset ( $ update [ $ type ] ) ) { $ update [ $ type ] = [ ] ; } $ update [ $ type ] [ $ field ] = $ value ; } if ( $ this -> atomic ) { $ update [ '$atomic' ] = 1 ; } return $ update ; }
Returns the formatted update query.

@return array update query
Returns the formatted update query .