public function setTemplateFile($file) { if (!file_exists($file)) { throw new Nette\InvalidArgumentException("File does not exists '{$file}'."); } $this->templateFile = $file; return $this; }