public function extractPrefixesFromQuery($query)
    {
        preg_match_all('/PREFIX\s+([a-z0-9]+)\:\s*\<([a-z0-9\:\/\.\#\-]+)\>/', $query, $matches);

        $prefixes = [];

        foreach ($matches[1] as $index => $key) {
            $prefixes[$key] = $matches[2][$index];
        }

        return $prefixes;
    }
public function extractPrefixesFromQuery($query)
    {
        preg_match_all('/PREFIX\s+([a-z0-9]+)\:\s*\<([a-z0-9\:\/\.\#\-]+)\>/', $query, $matches);

        $prefixes = [];

        foreach ($matches[1] as $index => $key) {
            $prefixes[$key] = $matches[2][$index];
        }

        return $prefixes;
    }
public function extractPrefixesFromQuery ( $ query ) { preg_match_all ( '/PREFIX\s+([a-z0-9]+)\:\s*\<([a-z0-9\:\/\.\#\-]+)\>/' , $ query , $ matches ) ; $ prefixes = [ ] ; foreach ( $ matches [ 1 ] as $ index => $ key ) { $ prefixes [ $ key ] = $ matches [ 2 ] [ $ index ] ; } return $ prefixes ; }
Extracts prefixes from the prologue part of the given query.

@param string $query query to get prologue prefixes from

@return array list of extracted prefixes
Extracts prefixes from the prologue part of the given query .