Completed
Push — qa-cumulative-ezp-31278-31279-... ( f57b9c...05fe70 )
by
unknown
14:35
created

IOConfigResolver   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 36
c 0
b 0
f 0
rs 10
wmc 4
lcom 0
cbo 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getRootDir() 0 4 1
A getLegacyUrlPrefix() 0 4 1
A getUrlPrefix() 0 4 1
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace eZ\Publish\Core\Repository\SiteAccessAware\Config;
10
11
use eZ\Publish\Core\IO\IOConfigProvider;
12
13
/**
14
 * @internal
15
 */
16
final class IOConfigResolver implements IOConfigProvider
17
{
18
    /** @var string */
19
    private $storageDir;
20
21
    /** @var string */
22
    private $legacyUrlPrefix;
23
24
    /** @var string */
25
    private $urlPrefix;
26
27
    public function __construct(
28
        string $storageDir,
29
        string $legacyUrlPrefix,
30
        string $urlPrefix
31
    ) {
32
        $this->storageDir = $storageDir;
33
        $this->legacyUrlPrefix = $legacyUrlPrefix;
34
        $this->urlPrefix = $urlPrefix;
35
    }
36
37
    public function getRootDir(): string
38
    {
39
        return $this->storageDir;
40
    }
41
42
    public function getLegacyUrlPrefix(): string
43
    {
44
        return $this->legacyUrlPrefix;
45
    }
46
47
    public function getUrlPrefix(): string
48
    {
49
        return $this->urlPrefix;
50
    }
51
}
52