private function applyOffsetLimit($endPointUrl)
    {
        $endPointUrlArray = parse_url($endPointUrl);

        if (!isset($endPointUrlArray['query'])) {
            $endPointUrlArray['query'] = null;
        }

        parse_str($endPointUrlArray['query'], $queryStringArray);

        $queryStringArray['offset'] = $this->offset;
        $queryStringArray['limit'] = min(max(1, $this->limit), 500);

        $endPointUrlArray['query'] = http_build_query($queryStringArray, null, '&');

        $endPointUrl = (isset($endPointUrlArray['scheme'])) ? "{$endPointUrlArray['scheme']}://" : '';
        $endPointUrl.= (isset($endPointUrlArray['host'])) ? "{$endPointUrlArray['host']}" : '';
        $endPointUrl.= (isset($endPointUrlArray['port'])) ? ":{$endPointUrlArray['port']}" : '';
        $endPointUrl.= (isset($endPointUrlArray['path'])) ? "{$endPointUrlArray['path']}" : '';
        $endPointUrl.= (isset($endPointUrlArray['query'])) ? "?{$endPointUrlArray['query']}" : '';

        return $endPointUrl;
    }
private function applyOffsetLimit($endPointUrl)
    {
        $endPointUrlArray = parse_url($endPointUrl);

        if (!isset($endPointUrlArray['query'])) {
            $endPointUrlArray['query'] = null;
        }

        parse_str($endPointUrlArray['query'], $queryStringArray);

        $queryStringArray['offset'] = $this->offset;
        $queryStringArray['limit'] = min(max(1, $this->limit), 500);

        $endPointUrlArray['query'] = http_build_query($queryStringArray, null, '&');

        $endPointUrl = (isset($endPointUrlArray['scheme'])) ? "{$endPointUrlArray['scheme']}://" : '';
        $endPointUrl.= (isset($endPointUrlArray['host'])) ? "{$endPointUrlArray['host']}" : '';
        $endPointUrl.= (isset($endPointUrlArray['port'])) ? ":{$endPointUrlArray['port']}" : '';
        $endPointUrl.= (isset($endPointUrlArray['path'])) ? "{$endPointUrlArray['path']}" : '';
        $endPointUrl.= (isset($endPointUrlArray['query'])) ? "?{$endPointUrlArray['query']}" : '';

        return $endPointUrl;
    }
private function applyOffsetLimit ( $ endPointUrl ) { $ endPointUrlArray = parse_url ( $ endPointUrl ) ; if ( ! isset ( $ endPointUrlArray [ 'query' ] ) ) { $ endPointUrlArray [ 'query' ] = null ; } parse_str ( $ endPointUrlArray [ 'query' ] , $ queryStringArray ) ; $ queryStringArray [ 'offset' ] = $ this -> offset ; $ queryStringArray [ 'limit' ] = min ( max ( 1 , $ this -> limit ) , 500 ) ; $ endPointUrlArray [ 'query' ] = http_build_query ( $ queryStringArray , null , '&' ) ; $ endPointUrl = ( isset ( $ endPointUrlArray [ 'scheme' ] ) ) ? "{$endPointUrlArray['scheme']}://" : '' ; $ endPointUrl .= ( isset ( $ endPointUrlArray [ 'host' ] ) ) ? "{$endPointUrlArray['host']}" : '' ; $ endPointUrl .= ( isset ( $ endPointUrlArray [ 'port' ] ) ) ? ":{$endPointUrlArray['port']}" : '' ; $ endPointUrl .= ( isset ( $ endPointUrlArray [ 'path' ] ) ) ? "{$endPointUrlArray['path']}" : '' ; $ endPointUrl .= ( isset ( $ endPointUrlArray [ 'query' ] ) ) ? "?{$endPointUrlArray['query']}" : '' ; return $ endPointUrl ; }
Apply offset and limit to a end point URL.
@param mixed $endPointUrl
@return string
Apply offset and limit to a end point URL .