Total Complexity | 4 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class TwigThemeDescriptor implements ThemeDescriptorInterface, \JsonSerializable |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $template; |
||
13 | |||
14 | /** |
||
15 | * @var mixed[] |
||
16 | */ |
||
17 | private $config; |
||
18 | |||
19 | /** |
||
20 | * @param string $template The Twig resource to be loaded |
||
21 | * @param mixed[] $config An array of configuration options that will be passed to the TwigTheme. Can be used to register parameters for the extensions, ... For instance, use the "theme" key to specify the theme used. |
||
22 | */ |
||
23 | public function __construct(string $template, array $config) |
||
24 | { |
||
25 | $this->template = $template; |
||
26 | $this->config = $config; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return string |
||
31 | */ |
||
32 | public function getTemplate(): string |
||
33 | { |
||
34 | return $this->template; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return mixed[] |
||
39 | */ |
||
40 | public function getConfig(): array |
||
43 | } |
||
44 | |||
45 | public function jsonSerialize() |
||
54 |