Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace League\Flysystem\UrlGeneration;
6
 
7
use League\Flysystem\Config;
8
use League\Flysystem\PathPrefixer;
9
 
10
class PrefixPublicUrlGenerator implements PublicUrlGenerator
11
{
12
    private PathPrefixer $prefixer;
13
 
14
    public function __construct(string $urlPrefix)
15
    {
16
        $this->prefixer = new PathPrefixer($urlPrefix, '/');
17
    }
18
 
19
    public function publicUrl(string $path, Config $config): string
20
    {
21
        return $this->prefixer->prefixPath($path);
22
    }
23
}