Bkwld\Croppa\URL::pathToUrl PHP Method

pathToUrl() public method

Append host to the path if it was defined
public pathToUrl ( string $path ) : string
$path string Request path (with leading slash)
return string
    public function pathToUrl($path)
    {
        if (empty($this->config['url_prefix'])) {
            return '/' . $path;
        } else {
            if (empty($this->config['path'])) {
                return rtrim($this->config['url_prefix'], '/') . '/' . $path;
            } else {
                return rtrim($this->config['url_prefix'], '/') . '/' . $this->relativePath($path);
            }
        }
    }