protected function determineUri()
    {
        $params = $this->getServerParams();
        
        $parts = $this->mapUriPartsFromServerParams($params);
        
        if (
            isset($params['SERVER_PROTOCOL']) &&
            \Jasny\str_starts_with(strtoupper($params['SERVER_PROTOCOL']), 'HTTP/')
        ) {
            $parts['scheme'] = !empty($params['HTTPS']) && $params['HTTPS'] !== 'off' ? 'https' : 'http';
        }
        
        if (isset($parts['host'])) {
            list($parts['host']) = explode(':', $parts['host'], 2); // May include the port
        }
        
        if (isset($parts['path'])) {
            $parts['path'] = parse_url($parts['path'], PHP_URL_PATH); // Includes the query string
        }

        return new UriObject($parts);
    }
protected function determineUri()
    {
        $params = $this->getServerParams();
        
        $parts = $this->mapUriPartsFromServerParams($params);
        
        if (
            isset($params['SERVER_PROTOCOL']) &&
            \Jasny\str_starts_with(strtoupper($params['SERVER_PROTOCOL']), 'HTTP/')
        ) {
            $parts['scheme'] = !empty($params['HTTPS']) && $params['HTTPS'] !== 'off' ? 'https' : 'http';
        }
        
        if (isset($parts['host'])) {
            list($parts['host']) = explode(':', $parts['host'], 2); // May include the port
        }
        
        if (isset($parts['path'])) {
            $parts['path'] = parse_url($parts['path'], PHP_URL_PATH); // Includes the query string
        }

        return new UriObject($parts);
    }
protected function determineUri ( ) { $ params = $ this -> getServerParams ( ) ; $ parts = $ this -> mapUriPartsFromServerParams ( $ params ) ; if ( isset ( $ params [ 'SERVER_PROTOCOL' ] ) && \ Jasny \ str_starts_with ( strtoupper ( $ params [ 'SERVER_PROTOCOL' ] ) , 'HTTP/' ) ) { $ parts [ 'scheme' ] = ! empty ( $ params [ 'HTTPS' ] ) && $ params [ 'HTTPS' ] !== 'off' ? 'https' : 'http' ; } if ( isset ( $ parts [ 'host' ] ) ) { list ( $ parts [ 'host' ] ) = explode ( ':' , $ parts [ 'host' ] , 2 ) ; // May include the port } if ( isset ( $ parts [ 'path' ] ) ) { $ parts [ 'path' ] = parse_url ( $ parts [ 'path' ] , PHP_URL_PATH ) ; // Includes the query string } return new UriObject ( $ parts ) ; }
Determine the URI base on the server parameters

@return string
Determine the URI base on the server parameters