Returns the scheme of 'serve' URLs

@param  boolean $bForceDownload Whether or not to force download

@return string
502615
public function urlServeScheme($bForceDownload = false)
    {
        $sUrl = $this->getUri('serve') . '/serve/{{bucket}}/{{filename}}{{extension}}';

        if ($bForceDownload) {
            $sUrl .= '?dl=1';
        }

        return $this->urlMakeSecure($sUrl, false);
    }
927608
public function file($server = '', $download = true)
    {
        $field = $this;

        return $this->unescape()->as(function ($path) use ($server, $download, $field) {
            $name = basename($path);

            $field->border = false;

            $size = $url = '';

            if (url()->isValidUrl($path)) {
                $url = $path;
            } elseif ($server) {
                $url = $server.$path;
            } else {
                $storage = Storage::disk(config('admin.upload.disk'));
                if ($storage->exists($path)) {
                    $url = $storage->url($path);
                    $size = ($storage->size($path) / 1000).'KB';
                }
            }

            if (!$url) {
                return '';
            }

            return <<<HTML
<ul class="mailbox-attachments clearfix">
    <li style="margin-bottom: 0;">
      <span class="mailbox-attachment-icon"><i class="fa {$field->getFileIcon($name)}"></i></span>
      <div class="mailbox-attachment-info">
        <div class="mailbox-attachment-name">
            <i class="fa fa-paperclip"></i> {$name}
            </div>
            <span class="mailbox-attachment-size">
              {$size}&nbsp;
              <a href="{$url}" class="btn btn-default btn-xs pull-right" target="_blank"><i class="fa fa-cloud-download"></i></a>
            </span>
      </div>
    </li>
  </ul>
HTML;
        });
    }
1330457
public function getBaseUrl()
    {
        if (isset($_SERVER['HTTP_HOST']) && preg_match('/^((\[[0-9a-f:]+\])|(\d{1,3}(\.\d{1,3}){3})|[a-z0-9\-\.]+)(:\d+)?$/i', $_SERVER['HTTP_HOST'])) {
            $base_url = ($this->isSecure() ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST']
            . substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME'])));
        } else {
            $base_url = 'http://localhost/';
        }

        return rtrim($base_url, '/') . '/';
    }
237217
protected function getBaseUrl()
    {
        if (isset($this->baseUrl)) {
            return $this->baseUrl;
        }

        $this->baseUrl = $this->container->getParameter('tenside.self_update.base_url');

        if (false === strpos($this->baseUrl, '://')) {
            $this->baseUrl = (extension_loaded('openssl') ? 'https' : 'http') . '://' . $this->baseUrl;
        }

        return $this->baseUrl;
    }
1191039
public function urlServeRaw($sObject, $sBucket)
    {
        $sUrl = 'assets/uploads/' . $sBucket . '/' . $sObject;
        return $this->urlMakeSecure($sUrl, false);
    }
279883
public function getUrls() : string
    {
        $regex = '((https?|ftp)://)?'; // SCHEME
        $regex .= '([a-z0-9+!*(),;?&=$_.-]+(:[a-z0-9+!*(),;?&=$_.-]+)?@)?'; // User and Pass
        $regex .= '([a-z0-9\-\.]*)\.(([a-z]{2,4})|([0-9]{1,3}\.([0-9]{1,3})\.([0-9]{1,3})))'; // Host or IP
        $regex .= "(:[0-9]{2,5})?"; // Port
        $regex .= '(/([a-z0-9+$_%-]\.?)+)*/?'; // Path
        $regex .= '(\?[a-z+&\$_.-][a-z0-9;:@&%=+/$_.-]*)?'; // GET Query
        $regex .= '(#[a-z_.-][a-z0-9+$%_.-]*)?'; // Anchor
        return $regex;
    }
1357252
public function getRealUrl($url)
	{
		if (config('services.cdn.base_url')) {
			$s3_url = self::$s3_base_url . config('filesystems.disks.s3.bucket') . '/';

			return str_replace($s3_url, config('services.cdn.base_url'), $url);
		} else {
			return $url;
		}
	}
415639
public function get_url($forcedownload=false, $https=false) {
        if (!$this->is_readable()) {
            return null;
        }

        if ($this->is_directory()) {
            return null;
        }

        $this->urlbase;
        $contextid = $this->lf->get_contextid();
        $component = $this->lf->get_component();
        $filearea  = $this->lf->get_filearea();
        $itemid    = $this->lf->get_itemid();
        $filepath  = $this->lf->get_filepath();
        $filename  = $this->lf->get_filename();

        if ($this->itemidused) {
            $path = '/'.$contextid.'/'.$component.'/'.$filearea.'/'.$itemid.$filepath.$filename;
        } else {
            $path = '/'.$contextid.'/'.$component.'/'.$filearea.$filepath.$filename;
        }
        return file_encode_url($this->urlbase, $path, $forcedownload, $https);
    }
499836
public function getUrlBoletoPDF()
    {
        $result = "";

        // if isBoletoPayment is not called first load the order
        if ($this->order == null) {
            $this->order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
        }

        if ($this->order->getPayment()->getMethod() == "adyen_boleto") {
            $result = $this->order->getAdyenBoletoPdf();
        }

        return $result;
    }
1153278
public function getImageUrl($sFile = null, $bSsl = null)
    {
        if ($sFile) {
            $sValue = $this->getConfig()->getImageUrl($this->isAdmin(), $bSsl, null, $sFile);
        } elseif (($sValue = $this->getViewConfigParam('imagedir')) === null) {
            $sValue = $this->getConfig()->getImageUrl($this->isAdmin(), $bSsl);
            $this->setViewConfigParam('imagedir', $sValue);
        }

        return $sValue;
    }
505395
public function getUrl()
    {
		if ($this->isLink()) {
			if ($this->getParentServer()->id != $this->prototype->getParentServer()->id) {
				return $this->prototype->getFullUrl();
			}
			else {
				return $this->prototype->getUrl();
			}
		}
		else {
			if ($this->_url === FALSE) $this->fillPath();
			return $this->_url;
		}
    }
1361493
protected function get_file_download_link($sharedurl) {
        $url = new \moodle_url($sharedurl);
        $url->param('dl', 1);

        return $url->out(false);
    }
1314138
public function getServerPublicKey($raw = false)
    {
        if ($raw) {
            return $this->publicKeyContent;
        }

        return Base64Url::encode($this->publicKeyContent);
    }
656674
public function getRequestUrl(): string
    {
        $url = $this->getUrl();

        if ($this->getRequestParameters()) {
            $url = $this->attachQueryToUrl($url, $this->httpBuildQuery($this->getRequestParameters()));
        }

        return $url;
    }
1093321
public function getMediaUrl($sFile = '')
    {
        $oConfig = $this->getConfig();

        $sFilePath = $this->getMediaPath($sFile);

        if (!is_readable($sFilePath)) {
            return false;
        }

        if ($oConfig->isSsl()) {
            $sUrl = $oConfig->getSslShopUrl(false);
        } else {
            $sUrl = $oConfig->getShopUrl(false);
        }

        $sUrl = rtrim($sUrl, '/') . $this->_sMediaPath;

        if ($sFile) {
            return $sUrl . $sFile;
        }

        return $sUrl;
    }
890790
protected function get_api_url( $endpoint, $download_link = false ) {
		$type     = $this->return_repo_type();
		$segments = [
			'owner'  => $this->type->owner,
			'repo'   => $this->type->slug,
			'branch' => empty( $this->type->branch ) ? 'master' : $this->type->branch,
		];

		foreach ( $segments as $segment => $value ) {
			$endpoint = str_replace( ':' . $segment, sanitize_text_field( $value ), $endpoint );
		}

		$repo_api = $this->get_repo_api( $type['git'], $this->type );
		switch ( $type['git'] ) {
			case 'github':
				if ( ! $this->type->enterprise && $download_link ) {
					$type['base_download'] = $type['base_uri'];
					break;
				}
				if ( $this->type->enterprise_api ) {
					$type['base_download'] = $this->type->enterprise_api;
					$type['base_uri']      = null;
					if ( $download_link ) {
						break;
					}
				}
				$endpoint = $repo_api->add_endpoints( $this, $endpoint );
				break;
			case 'gitlab':
				if ( ! $this->type->enterprise && $download_link ) {
					break;
				}
				if ( $this->type->enterprise ) {
					$type['base_download'] = $this->type->enterprise;
					$type['base_uri']      = null;
					if ( $download_link ) {
						break;
					}
				}
				$endpoint = $repo_api->add_endpoints( $this, $endpoint );
				break;
			case 'bitbucket':
				$this->load_authentication_hooks();
				if ( $this->type->enterprise_api ) {
					if ( $download_link ) {
						$type['base_download'] = $type['base_uri'];
						break;
					}
					$endpoint = $repo_api->add_endpoints( $this, $endpoint );

					return $this->type->enterprise_api . $endpoint;
				}
				if ( $download_link && 'release_asset' === self::$method ) {
					$type['base_download'] = $type['base_uri'];
				}
				$endpoint = $repo_api->add_endpoints( $this, $endpoint );
				break;
			case 'gitea':
				if ( $download_link ) {
					$type['base_download'] = $type['base_uri'];
					break;
				}
				$endpoint = $repo_api->add_endpoints( $this, $endpoint );
				break;
			default:
				break;
		}

		$base = $download_link ? $type['base_download'] : $type['base_uri'];

		return $base . $endpoint;
	}
456391
public function getUrl($paths, $basePath = null)
    {
        if (is_array($paths) === false) {
            $paths = array($paths);
        }

        $minUrl = $this->container->get('router')->generate('rednose_combo_handler_combo');

        foreach ($paths as &$path) {
            if ($basePath !== null) {
                $path = $basePath . '/' . $path;
            }

            $files[] = $path;
        }

        $files = implode(',', $paths);

        return $minUrl . '?' . $files;
    }