<?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);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| ChainedPublicUrlGenerator.php | File | 747 B | 0644 |
|
| PrefixPublicUrlGenerator.php | File | 499 B | 0644 |
|
| PublicUrlGenerator.php | File | 313 B | 0644 |
|
| ShardedPrefixPublicUrlGenerator.php | File | 956 B | 0644 |
|
| TemporaryUrlGenerator.php | File | 377 B | 0644 |
|