Total Complexity | 5 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class PhpTemplatesTag extends Tag implements PhpTemplatesTagInterface |
||
8 | { |
||
9 | /** @var string */ |
||
10 | protected $template; |
||
11 | |||
12 | /** @var array */ |
||
13 | protected $context = []; |
||
14 | |||
15 | public function __construct(string $key, string $template) |
||
16 | { |
||
17 | parent::__construct($key); |
||
|
|||
18 | |||
19 | $this->template = $template; |
||
20 | } |
||
21 | |||
22 | public function getTemplate(): string |
||
23 | { |
||
24 | return $this->template; |
||
25 | } |
||
26 | |||
27 | public function getContext(): array |
||
28 | { |
||
29 | return $this->context; |
||
30 | } |
||
31 | |||
32 | public function setContext(array $context): self |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param mixed $value |
||
41 | */ |
||
42 | public function addContext(string $key, $value): self |
||
47 | } |
||
48 | } |
||
49 |