Total Complexity | 6 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | final class BeforeRender implements StoppableEventInterface |
||
14 | { |
||
15 | private View $view; |
||
16 | |||
17 | /** |
||
18 | * @var string The view file being rendered. |
||
19 | */ |
||
20 | private string $file; |
||
21 | |||
22 | /** |
||
23 | * @var array The parameters array passed to the {@see View::render()} or {@see View::renderFile()} method. |
||
24 | */ |
||
25 | private array $parameters; |
||
26 | |||
27 | private bool $stopPropagation = false; |
||
28 | |||
29 | public function __construct(View $view, string $file, array $parameters) |
||
30 | { |
||
31 | $this->view = $view; |
||
32 | $this->file = $file; |
||
33 | $this->parameters = $parameters; |
||
34 | } |
||
35 | |||
36 | public function stopPropagation(): void |
||
37 | { |
||
38 | $this->stopPropagation = true; |
||
39 | } |
||
40 | |||
41 | public function isPropagationStopped(): bool |
||
44 | } |
||
45 | |||
46 | public function getView(): View |
||
49 | } |
||
50 | |||
51 | public function getFile(): string |
||
52 | { |
||
53 | return $this->file; |
||
54 | } |
||
55 | |||
56 | public function getParameters(): array |
||
59 | } |
||
60 | } |
||
61 |