src/includes/classes/Core/Utils/Url.php
public function toCurrent(string $uri = '', string $scheme = '', bool $cdn_filter = true): string
    {
        if (!($host = $this->c::currentHost())) {
            throw $this->c::issue('Current host is empty.');
        }
        $uri = $uri ? $this->c::mbLTrim($uri, '/') : '';
        $uri = $uri ? '/'.$uri : ''; // Force leading slash.

        if ($uri && defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
            $uri = preg_replace('/\.min\.js($|[?])/u', '.js${1}', $uri);
        } // This allows developers to debug uncompressed JS files.

        $base_path = $this->App->Config->©urls['©base_paths']['©app'];
        $base_path = $base_path && $uri ? $this->c::mbRTrim($base_path, '/') : $base_path;

        $url = $this->c::setScheme('//'.$host.$base_path.$uri, $scheme);

        if ($uri && $cdn_filter) {
            $url = $this->c::cdnFilter($url);
        }
        return $url;
    }
public function toCurrent(string $uri = '', string $scheme = '', bool $cdn_filter = true): string
    {
        if (!($host = $this->c::currentHost())) {
            throw $this->c::issue('Current host is empty.');
        }
        $uri = $uri ? $this->c::mbLTrim($uri, '/') : '';
        $uri = $uri ? '/'.$uri : ''; // Force leading slash.

        if ($uri && defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) {
            $uri = preg_replace('/\.min\.js($|[?])/u', '.js${1}', $uri);
        } // This allows developers to debug uncompressed JS files.

        $base_path = $this->App->Config->©urls['©base_paths']['©app'];
        $base_path = $base_path && $uri ? $this->c::mbRTrim($base_path, '/') : $base_path;

        $url = $this->c::setScheme('//'.$host.$base_path.$uri, $scheme);

        if ($uri && $cdn_filter) {
            $url = $this->c::cdnFilter($url);
        }
        return $url;
    }
Build URL w/ current host.

@since 151121 URL utilities.

@param string $uri        URI to append.
@param string $scheme     Specific scheme?
@param bool   $cdn_filter CDN filter?

@return string Output URL w/ current host.