Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Wn\Generators\Template; |
||
20 | public function load($name) |
||
21 | { |
||
22 | if(! isset($this->loaded[$name])){ |
||
23 | $path = __DIR__ . "/../../templates/{$name}.wnt"; |
||
24 | try { |
||
25 | $this->loaded[$name] = $this->fs->get($path); |
||
26 | } catch(\Exception $e) { |
||
27 | throw new TemplateException("Unable to read the file '{$path}'"); |
||
28 | } |
||
29 | } |
||
30 | return new Template($this, $this->loaded[$name]); |
||
31 | } |
||
32 | |||
34 |