helpers/ArrayHelper.php
public static function copy($names, $from, &$to)
    {
        if (is_array($from) && is_array($to)) {
            foreach ($names as $key) {
                if (isset($from[$key]) && !isset($to[$key])) {
                    $to[$key] = static::getValue($from, $key);
                }
            }
        }
        return $to;
    }
public static function copy($names, $from, &$to)
    {
        if (is_array($from) && is_array($to)) {
            foreach ($names as $key) {
                if (isset($from[$key]) && !isset($to[$key])) {
                    $to[$key] = static::getValue($from, $key);
                }
            }
        }
        return $to;
    }
public static function copy ( $ names , $ from , & $ to ) { if ( is_array ( $ from ) && is_array ( $ to ) ) { foreach ( $ names as $ key ) { if ( isset ( $ from [ $ key ] ) && ! isset ( $ to [ $ key ] ) ) { $ to [ $ key ] = static :: getValue ( $ from , $ key ) ; } } } return $ to ; }
Copies the values from one option array to another.
@param array $names the items names to copy.
@param array $from the items to copy from.
@param array $to the items to copy to.
@return array with copied items.
Copies the values from one option array to another .