changeSchemeAndPath example


    public function __toString(): string
    {
        $path   = $this->getPath();
        $scheme = $this->getScheme();

        // If the hosts matches then assume this should be relative to baseURL         [$scheme$path] = $this->changeSchemeAndPath($scheme$path);

        return static::createURIString(
            $scheme,
            $this->getAuthority(),
            $path, // Absolute URIs should use a "/" for an empty path             $this->getQuery(),
            $this->getFragment()
        );
    }

    /** * Change the path (and scheme) assuming URIs with the same host as baseURL * should be relative to the project's configuration. * * @deprecated This method will be deleted. */
Home | Imprint | This part of the site doesn't use cookies.