src/includes/classes/Core/Utils/Cdn.php
public function url(string $uri, string $scheme = ''): string
    {
        if (!($host = $this->App->Config->©urls['©hosts']['©cdn'])) {
            throw $this->c::issue('Missing CDN host name.');
        }
        $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']['©cdn'];
        $base_path = $base_path && $uri ? $this->c::mbRTrim($base_path, '/') : $base_path;

        return $url = $this->c::setScheme('//'.$host.$base_path.$uri, $scheme);
    }
public function url(string $uri, string $scheme = ''): string
    {
        if (!($host = $this->App->Config->©urls['©hosts']['©cdn'])) {
            throw $this->c::issue('Missing CDN host name.');
        }
        $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']['©cdn'];
        $base_path = $base_path && $uri ? $this->c::mbRTrim($base_path, '/') : $base_path;

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

@since 150424 Initial release.

@param string $uri    URI to serve via CDN.
@param string $scheme Specific scheme?

@return string Output URL.