Upgrade framework
This commit is contained in:
23
vendor/league/flysystem/src/UrlGeneration/PrefixPublicUrlGenerator.php
vendored
Normal file
23
vendor/league/flysystem/src/UrlGeneration/PrefixPublicUrlGenerator.php
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user