| Conditions | 4 |
| Paths | 6 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function load($path) |
||
| 27 | { |
||
| 28 | if ($this->pathResolver !== null) { |
||
| 29 | $resolver = $this->pathResolver; |
||
| 30 | $path = $resolver($path); |
||
| 31 | } |
||
| 32 | |||
| 33 | if (!isset($this->content[$path])) { |
||
| 34 | if (!file_exists($path)) { |
||
| 35 | throw new \Exception( |
||
| 36 | sprintf('Could not find template file %s', $path) |
||
| 37 | ); |
||
| 38 | } |
||
| 39 | |||
| 40 | $this->content[$path] = file_get_contents($path); |
||
| 41 | } |
||
| 42 | |||
| 43 | return $this->content[$path]; |
||
| 44 | } |
||
| 46 |