1 | <?php |
||
15 | final class ConfigResolver |
||
16 | { |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $prefix; |
||
21 | |||
22 | /** |
||
23 | * @var array|string[] |
||
24 | */ |
||
25 | private $allowed; |
||
26 | |||
27 | /** |
||
28 | * ConfigResolver constructor. |
||
29 | * @param string $prefix |
||
30 | * @param array $allowed |
||
31 | */ |
||
32 | public function __construct(string $prefix, array $allowed) |
||
37 | |||
38 | /** |
||
39 | * @param string $name |
||
40 | * @return bool |
||
41 | */ |
||
42 | public function match(string $name): bool |
||
46 | |||
47 | /** |
||
48 | * @param string $name |
||
49 | * @return null|string |
||
50 | */ |
||
51 | public function resolve(string $name): ?string |
||
57 | } |
||
58 |