private function addOperatorToChange(&$changes,$operator,$kvp)
    {
        if (!isset($changes[$operator]) || !is_array($changes[$operator]))
        {
            $changes[$operator] = array();
        }
        foreach($kvp as $key=>$value)
        {
            if (isset($changes[$operator][$key]))
            {
                $value = array_merge($value,$changes[$operator][$key]);
            }
            $changes[$operator][$key] = $value;
        }
    }
private function addOperatorToChange(&$changes,$operator,$kvp)
    {
        if (!isset($changes[$operator]) || !is_array($changes[$operator]))
        {
            $changes[$operator] = array();
        }
        foreach($kvp as $key=>$value)
        {
            if (isset($changes[$operator][$key]))
            {
                $value = array_merge($value,$changes[$operator][$key]);
            }
            $changes[$operator][$key] = $value;
        }
    }
private function addOperatorToChange ( & $ changes , $ operator , $ kvp ) { if ( ! isset ( $ changes [ $ operator ] ) || ! is_array ( $ changes [ $ operator ] ) ) { $ changes [ $ operator ] = array ( ) ; } foreach ( $ kvp as $ key => $ value ) { if ( isset ( $ changes [ $ operator ] [ $ key ] ) ) { $ value = array_merge ( $ value , $ changes [ $ operator ] [ $ key ] ) ; } $ changes [ $ operator ] [ $ key ] = $ value ; } }
Helper method to add operator to a set of existing changes ready to be sent to Mongo
@param $changes
@param $operator
@param $kvp
Helper method to add operator to a set of existing changes ready to be sent to Mongo