* @param mixed $_tpl template, can either be a ITemplate object (i.e. TemplateFile), a
* valid path to a template, or a template as a string it is recommended to
* provide a ITemplate as it will probably make things faster, especially if
* you render a template multiple times
Code that handles the template parameter
if ($_tpl instanceof ITemplate) {
// valid, skip
} elseif (is_string($_tpl)) {
$_tpl = new TemplateFile($_tpl);
$_tpl->setIncludePath($this->getTemplateDir());
} else {
throw new Exception('Dwoo->get\'s first argument must be a ITemplate (i.e. TemplateFile) or a valid path to a template file', E_USER_NOTICE);
}
The file: https://github.com/dwoo-project/dwoo/blob/master/lib/Dwoo/Core.php#L301
PhpDoc
Code that handles the template parameter