| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 30.76% |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 21 | final class View extends BaseView |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * Marks the beginning of a view. |
||
| 25 | */ |
||
| 26 | public function beginPage(): void |
||
| 27 | { |
||
| 28 | ob_start(); |
||
| 29 | PHP_VERSION_ID >= 80000 ? ob_implicit_flush(false) : ob_implicit_flush(0); |
||
| 30 | |||
| 31 | $this->eventDispatcher->dispatch(new PageBegin($this)); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Marks the ending of a view. |
||
| 36 | */ |
||
| 37 | public function endPage(): void |
||
| 38 | { |
||
| 39 | $this->eventDispatcher->dispatch(new PageEnd($this)); |
||
| 40 | |||
| 41 | ob_end_flush(); |
||
| 42 | } |
||
| 43 | |||
| 44 | 5 | protected function createBeforeRenderEvent(string $viewFile, array $parameters): StoppableEventInterface |
|
| 45 | { |
||
| 46 | 5 | return new BeforeRender($this, $viewFile, $parameters); |
|
| 47 | } |
||
| 48 | |||
| 49 | 5 | protected function createAfterRenderEvent( |
|
| 55 | } |
||
| 56 | } |
||
| 57 |