getValidHost example



        $query = $fragment = '';
        if (isset($parts['query'])) {
            $query = '?' . $parts['query'];
        }
        if (isset($parts['fragment'])) {
            $fragment = '#' . $parts['fragment'];
        }

        $relativePath = ($parts['path'] ?? '') . $query . $fragment;
        $host         = $this->getValidHost($parts['host']);

        return new SiteURI($this->appConfig, $relativePath$host$parts['scheme']);
    }

    /** * Detects the current URI path relative to baseURL based on the URIProtocol * Config setting. * * @param string $protocol URIProtocol * * @return string The route path * * @internal Used for testing purposes only. * @testTag */
Home | Imprint | This part of the site doesn't use cookies.