Get the source path to the image location on the webserver.

@param string $scheme Whether the source path should be absolute or not.
@return string|boolean
438199
public function getSource($scheme = false)
    {
        if (!$this->getFileExists()) {
            if (Yii::$app->storage->autoFixMissingImageSources === false) {
                return false;
            }
            
            // The image source does not exist, probably it has been deleted due to filter changes.
            // storage component is going go try to re-create this image now.
            $apply = Yii::$app->storage->createImage($this->getFileId(), $this->getFilterId());
        }
        
        $fileName = $this->getFilterId() . '_' . $this->getFile()->getSystemFileName();
        
        return $scheme ? Yii::$app->storage->fileAbsoluteHttpPath($fileName) : Yii::$app->storage->fileHttpPath($fileName);
    }
725029
public function getPathURL($path = '', $public = true)
    {
        $path = $this->getStoragePath($path);

        return $this->_storage->getUrl($path, $public);
    }
1074315
public function getUrl($path) {
        $mapping = $this->mapper->get($path);

        if (!$mapping) {
            return false;
        }

        try {
            $volume = $this->client->lookup($mapping['fid']);

            return $this->client->buildVolumeUrl($volume->getPublicUrl(), $mapping['fid']);
        } catch (SeaweedFSException $e) {
            return false;
        }
    }
1368735
public function getUrl($include_scheme = true)
    {
        $parts = parse_url(url('/'));
        $scheme = '';
        if ($include_scheme) {
            $scheme = 'ws://';
        }
        return $scheme . $parts['host'] . ':' . $this->port;
    }
518061
public PathImpl get(String scheme)
  {
    ConcurrentHashMap<String,SchemeRoot> map = getMap();
    
    SchemeRoot root = map.get(scheme);

    if (root == null) {
      PathImpl rootPath = createLazyScheme(scheme);
      
      if (rootPath != null) {
        map.putIfAbsent(scheme, new SchemeRoot(rootPath));
        root = map.get(scheme);
      }
    }
    
    PathImpl path = null;
    
    if (root != null) {
      path = root.getRoot();
    }
    
    if (path != null) {
      return path;
    }
    else {
      return new NotFoundPath(this, scheme + ":");
    }
  }
1200808
public function withScheme(string $scheme): UriInterface
    {
        $scheme = $this->marshalScheme($scheme);

        if ( $this->scheme === $scheme ) {
            return $this;
        }

        $instance = clone $this;
        $instance->scheme = $scheme;
        $instance->calibratePort();

        return $instance;
    }
566072
public function setScheme($scheme)
    {
        if ($this->scheme == 'http' && $this->port == 80) {
            $this->port = null;
        } elseif ($this->scheme == 'https' && $this->port == 443) {
            $this->port = null;
        }

        $this->scheme = $scheme;

        return $this;
    }
1069598
private function filterScheme(string $scheme): string
    {
        $result = strtolower($scheme);
        if (isset(self::$knownPorts[$result])) {
            return $result;
        }

        $result = preg_replace('#:(//)?$#', '', $result);
        if (!preg_match('#^[a-z][a-z0-9\+\-\.]*$#i', $result)) {
            throw new \InvalidArgumentException(sprintf('Invalid scheme "%s".', $scheme));
        }

        return $result;
    }
1220301
public static function parse(string $scheme): SchemeInterface
    {
        if (!self::myParse($scheme, $result, $type, $defaultPort, $error)) {
            throw new SchemeInvalidArgumentException($error);
        }

        return new self($result, $type, $defaultPort);
    }
1065755
public function url($pipeline, $src, $scheme = false)
    {
        $src = ltrim(is_array($src) ? $src[0] : $src, '/');
        $version = $this->getPipelineVersion($pipeline);
        return Url::to("@web/$this->path/$pipeline/$version/$src", $scheme)
            . '?'
            . $this->getToken($src);
    }
827659
public function getPath(string $ref)
    {
        $properties     = $this->getProperties();
        $optionsPath    = $properties['optionsPath'];

        return array_key_exists($ref, $optionsPath) ? $optionsPath[$ref] : false;
    }
1270137
private function normalizeScheme($scheme)
    {
        if (!is_string($scheme) && !method_exists($scheme, '__toString')) {
            throw new InvalidArgumentException('Uri scheme must be a string');
        }

        $scheme = str_replace('://', '', strtolower((string) $scheme));
        if (!isset($this->validSchema[$scheme])) {
            throw new InvalidArgumentException('Uri scheme must be one of: "", "https", "http"');
        }

        return $scheme;
    }
858819
public function get($args = [], $scheme = false)
    {
        if (is_string($args)) {
            $url = $args;
            if ($url === '') {
                return $this->router->createUrl($url, $scheme);
            } elseif ($url[0] === '/') {
                $url = $this->alias->get('@web') . $url;
                if (!$scheme) {
                    return $url;
                }
            } elseif (parse_url($url, PHP_URL_SCHEME)) {
                return $url;
            } else {
                return $this->router->createUrl($url, $scheme);
            }
            $anchor = null;
            $args = '';
        } else {
            $url = $args[0];
            if ($url === '') {
                return $this->router->createUrl($args, $scheme);
            } elseif ($url[0] === '/') {
                $url = $this->alias->get('@web') . $url;
            } elseif (parse_url($url, PHP_URL_SCHEME)) {
                null;
            } else {
                return $this->router->createUrl($args, $scheme);
            }

            $anchor = isset($args['#']) ? $args['#'] : null;
            unset($args[0], $args['#']);
        }

        if ($args) {
            $url .= (strpos($url, '?') !== false ? '&' : '?') . http_build_query($args);
        }

        if ($anchor !== null) {
            $url .= '#' . $anchor;
        }

        if ($scheme) {
            if ($scheme === true) {
                $scheme = $this->request->getScheme();
            }
            return ($scheme === '//' ? $scheme : "$scheme://") . $this->request->getServer('HTTP_HOST') . $url;
        } else {
            return $url;
        }
    }
95145
protected static function isValidScheme(?string $scheme): bool
    {
        // http://tools.ietf.org/html/rfc3986#section-3
        // The scheme and path components are required, though the path may be
        // empty (no characters)
        if ($scheme === null || $scheme === '') {
            return false;
        }

        return !!preg_match(static::SCHEME_PATTERN, $scheme);
    }
478232
protected function getPort($scheme)
    {
        if ($scheme == self::SCHEME_WEBSOCKET) {
            return 80;
        } elseif ($scheme == self::SCHEME_WEBSOCKET_SECURE) {
            return 443;
        } elseif ($scheme == self::SCHEME_UNDERLYING) {
            return 80;
        } elseif ($scheme == self::SCHEME_UNDERLYING_SECURE) {
            return 443;
        } else {
            throw new InvalidArgumentException('Unknown websocket scheme');
        }
    }
689168
public function getSourcePath() {

		// lazy init

		if(is_null($this->sourcePath)) {

			$this->sourcePath =
				$this->rootPath .
				'src' . DIRECTORY_SEPARATOR;

		}

		return $this->sourcePath;

	}
46672
protected function _getImagePath($sType)
    {
        $sFolder = array_key_exists($sType, $this->_aTypeToPath) ? $this->_aTypeToPath[$sType] : '0';

        return $this->normalizeDir(\OxidEsales\Eshop\Core\Registry::getConfig()->getPictureDir(false)) . "{$sFolder}/";
    }