public function setTemplate($template)
{
if ((substr($template, -6) == '.phtml' || substr($template, -5) == '.php3' || substr($template, -4) == '.php') && file_exists($template)) {
$this->templateFile = $template;
$this->templateString = null;
} else {
$this->templateString = $template;
$this->templateFile = null;
}
return $this;
}