Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function getAbsoluteDirectory(): string |
||
23 | { |
||
24 | $viewPath = str_replace('.', '/', $this->viewDirectory); |
||
25 | |||
26 | $absoluteDirectory = View::getFinder()->getHints()[$this->namespace][0] ?? null; |
||
27 | |||
28 | if (! $absoluteDirectory) { |
||
29 | throw CouldNotRegisterComponent::viewPathNotFound($viewPath); |
||
30 | } |
||
31 | |||
32 | return $viewPath ? "{$absoluteDirectory}/{$viewPath}" : $absoluteDirectory; |
||
33 | } |
||
34 | |||
40 |