src/Util/ArrayUtils.php
public static function getAllArrayItemsByKeyPrefix($array, $prefix, $stripPrefix = false) {
        $returnValues = array();
        foreach ($array as $key => $value) {
            $positionOfPrefix = strpos($key, $prefix);
            if (is_numeric($positionOfPrefix) && $positionOfPrefix == 0) {
                if ($stripPrefix) $key = substr($key, strlen($prefix));
                $returnValues [$key] = $value;
            }
        }

        return $returnValues;
    }
public static function getAllArrayItemsByKeyPrefix($array, $prefix, $stripPrefix = false) {
        $returnValues = array();
        foreach ($array as $key => $value) {
            $positionOfPrefix = strpos($key, $prefix);
            if (is_numeric($positionOfPrefix) && $positionOfPrefix == 0) {
                if ($stripPrefix) $key = substr($key, strlen($prefix));
                $returnValues [$key] = $value;
            }
        }

        return $returnValues;
    }
public static function getAllArrayItemsByKeyPrefix ( $ array , $ prefix , $ stripPrefix = false ) { $ returnValues = array ( ) ; foreach ( $ array as $ key => $ value ) { $ positionOfPrefix = strpos ( $ key , $ prefix ) ; if ( is_numeric ( $ positionOfPrefix ) && $ positionOfPrefix == 0 ) { if ( $ stripPrefix ) $ key = substr ( $ key , strlen ( $ prefix ) ) ; $ returnValues [ $ key ] = $ value ; } } return $ returnValues ; }
Find all parameters in the passed array with a key starting with the supplied prefix.
Return them as an associative array by key.

@param array $array
@param string $prefix

@return array
Find all parameters in the passed array with a key starting with the supplied prefix . Return them as an associative array by key .