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