File "PrefixPublicUrlGenerator.php"
Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/vendor/league/flysystem/src/UrlGeneration/PrefixPublicUrlGenerator.php
File size: 499 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
declare(strict_types=1);
namespace League\Flysystem\UrlGeneration;
use League\Flysystem\Config;
use League\Flysystem\PathPrefixer;
class PrefixPublicUrlGenerator implements PublicUrlGenerator
{
private PathPrefixer $prefixer;
public function __construct(string $urlPrefix)
{
$this->prefixer = new PathPrefixer($urlPrefix, '/');
}
public function publicUrl(string $path, Config $config): string
{
return $this->prefixer->prefixPath($path);
}
}