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

IOConfigResolver::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
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\Bundle\EzPublishCoreBundle\SiteAccess\Config;
10
11
use eZ\Publish\Core\IO\IOConfigProvider;
12
13
/**
14
 * @internal
15
 */
16
final class IOConfigResolver implements IOConfigProvider
17
{
18
    /** @var \eZ\Bundle\EzPublishCoreBundle\SiteAccess\Config\ComplexConfigProcessor */
19
    private $complexConfigProcessor;
20
21
    public function __construct(
22
        ComplexConfigProcessor $complexConfigProcessor
23
    ) {
24
        $this->complexConfigProcessor = $complexConfigProcessor;
25
    }
26
27
    public function getRootDir(): string
28
    {
29
        return $this->complexConfigProcessor->processComplexSetting('io.root_dir');
30
    }
31
32
    public function getLegacyUrlPrefix(): string
33
    {
34
        return $this->complexConfigProcessor->processComplexSetting('io.legacy_url_prefix');
35
    }
36
37
    public function getUrlPrefix(): string
38
    {
39
        return $this->complexConfigProcessor->processComplexSetting('io.url_prefix');
40
    }
41
}
42