src/Util.php
public static function map(array $object, array $map)
    {
        $result = [];

        foreach ($map as $from => $to) {
            if ( ! isset($object[$from])) {
                continue;
            }

            $result[$to] = $object[$from];
        }

        return $result;
    }
public static function map(array $object, array $map)
    {
        $result = [];

        foreach ($map as $from => $to) {
            if ( ! isset($object[$from])) {
                continue;
            }

            $result[$to] = $object[$from];
        }

        return $result;
    }
public static function map ( array $ object , array $ map ) { $ result = [ ] ; foreach ( $ map as $ from => $ to ) { if ( ! isset ( $ object [ $ from ] ) ) { continue ; } $ result [ $ to ] = $ object [ $ from ] ; } return $ result ; }
Map result arrays.

@param array $object
@param array $map

@return array mapped result
Map result arrays .