src/Util/IriHelper.php
public static function parseIri(string $iri, string $pageParameterName): array
    {
        $parts = parse_url($iri);
        if (false === $parts) {
            throw new InvalidArgumentException(sprintf('The request URI "%s" is malformed.', $iri));
        }

        $parameters = [];
        if (isset($parts['query'])) {
            $parameters = RequestParser::parseRequestParams($parts['query']);

            // Remove existing page parameter
            unset($parameters[$pageParameterName]);
        }

        return ['parts' => $parts, 'parameters' => $parameters];
    }
public static function parseIri(string $iri, string $pageParameterName): array
    {
        $parts = parse_url($iri);
        if (false === $parts) {
            throw new InvalidArgumentException(sprintf('The request URI "%s" is malformed.', $iri));
        }

        $parameters = [];
        if (isset($parts['query'])) {
            $parameters = RequestParser::parseRequestParams($parts['query']);

            // Remove existing page parameter
            unset($parameters[$pageParameterName]);
        }

        return ['parts' => $parts, 'parameters' => $parameters];
    }
public static function parseIri ( string $ iri , string $ pageParameterName ) : array { $ parts = parse_url ( $ iri ) ; if ( false === $ parts ) { throw new InvalidArgumentException ( sprintf ( 'The request URI "%s" is malformed.' , $ iri ) ) ; } $ parameters = [ ] ; if ( isset ( $ parts [ 'query' ] ) ) { $ parameters = RequestParser :: parseRequestParams ( $ parts [ 'query' ] ) ; // Remove existing page parameter unset ( $ parameters [ $ pageParameterName ] ) ; } return [ 'parts' => $ parts , 'parameters' => $ parameters ] ; }
Parses and standardizes the request IRI.

@throws InvalidArgumentException
Parses and standardizes the request IRI .