public static function copyValues(array $keys, array $from, array $to, $force = false)
    {
        foreach ($keys as $key) {
            if (isset($from[$key])) {
                if ($force || !isset($to[$key])) {
                    $to[$key] = self::getValue($key, $from);
                }
            }
        }
        return $to;
    }
public static function copyValues(array $keys, array $from, array $to, $force = false)
    {
        foreach ($keys as $key) {
            if (isset($from[$key])) {
                if ($force || !isset($to[$key])) {
                    $to[$key] = self::getValue($key, $from);
                }
            }
        }
        return $to;
    }
public static function copyValues ( array $ keys , array $ from , array $ to , $ force = false ) { foreach ( $ keys as $ key ) { if ( isset ( $ from [ $ key ] ) ) { if ( $ force || ! isset ( $ to [ $ key ] ) ) { $ to [ $ key ] = self :: getValue ( $ key , $ from ) ; } } } return $ to ; }
Copies the given values from one array to another.
@param string[] $keys the keys to copy.
@param array $from the array to copy from.
@param array $to the array to copy to.
@param boolean $force whether to allow overriding of existing values.
@return array the options.
Copies the given values from one array to another .