fs = $fs; $this->loaded = []; } public function load($name) { if(! isset($this->loaded[$name])){ $path = __DIR__ . "/../../templates/{$name}.wnt"; try { $this->loaded[$name] = $this->fs->get($path); } catch(\Exception $e) { throw new TemplateException("Unable to read the file '{$path}'"); } } return new Template($this, $this->loaded[$name]); } }