protected function applyParameterMappings($parameters, $mappingRules)
    {
        foreach ($mappingRules as $k => $v)
        {
            if ($k != $v && isset($parameters[$k]))
            {
                $parameters[$v] = $parameters[$k];
                unset($parameters[$k]);
            }
        }
    }
protected function applyParameterMappings($parameters, $mappingRules)
    {
        foreach ($mappingRules as $k => $v)
        {
            if ($k != $v && isset($parameters[$k]))
            {
                $parameters[$v] = $parameters[$k];
                unset($parameters[$k]);
            }
        }
    }
protected function applyParameterMappings ( $ parameters , $ mappingRules ) { foreach ( $ mappingRules as $ k => $ v ) { if ( $ k != $ v && isset ( $ parameters [ $ k ] ) ) { $ parameters [ $ v ] = $ parameters [ $ k ] ; unset ( $ parameters [ $ k ] ) ; } } }
Changes the keys in a Parameters object according to the given mapping
rules.
@param Parameters $parameters Parameters to be modified.
@param string[] $mappingRules Associative array of mapping rules.
Parameter names will be mapped from keys to values of this array.
Changes the keys in a Parameters object according to the given mapping rules .