public function run() { if (!isset($this->resources['template'])) { throw new TemplateFetcher('template', $this); } $template = $this->resources['template']; echo $template->render($this->templateName, $this->vars); }