Completed
Push — 7.5 ( 8fcf9d...73b8c1 )
by
unknown
73:34 queued 49:09
created

LanguageResolver::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * File containing LanguageResolver class.
5
 *
6
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
7
 * @license For full copyright and license information view LICENSE file distributed with this source code.
8
 */
9
namespace eZ\Publish\Core\Repository\SiteAccessAware\Language;
10
11
/**
12
 * Resolves language settings for use in SiteAccess aware Repository.
13
 */
14
final class LanguageResolver extends AbstractLanguageResolver
15
{
16
    /**
17
     * Values typically provided by configuration.
18
     *
19
     * @var string[]
20
     */
21
    private $configLanguages;
22
23
    public function __construct(
24
        array $configLanguages,
25
        bool $defaultUseAlwaysAvailable = true,
26
        bool $defaultShowAllTranslations = false
27
    ) {
28
        $this->configLanguages = $configLanguages;
29
        parent::__construct($defaultUseAlwaysAvailable, $defaultShowAllTranslations);
30
    }
31
32
    protected function getConfiguredLanguages(): array
33
    {
34
        return $this->configLanguages;
35
    }
36
}
37