public static function reduce(array $set, array $keys) {
        $array = array();

        foreach ($set as $key => $value) {
            if (in_array($key, $keys)) {
                $array[$key] = $value;
            }
        }

        return $array;
    }
public static function reduce(array $set, array $keys) {
        $array = array();

        foreach ($set as $key => $value) {
            if (in_array($key, $keys)) {
                $array[$key] = $value;
            }
        }

        return $array;
    }
public static function reduce ( array $ set , array $ keys ) { $ array = array ( ) ; foreach ( $ set as $ key => $ value ) { if ( in_array ( $ key , $ keys ) ) { $ array [ $ key ] = $ value ; } } return $ array ; }
Reduce an array by removing all keys that have not been defined for persistence.

@param array $set
@param array $keys
@return array
Reduce an array by removing all keys that have not been defined for persistence .