public function setHelper($funcName, $funcDef)
{
if (!isset($this->helperFunctions[$funcName])) {
$this->helperFunctions[$funcName] = $funcDef;
} else {
throw new \LogicException('The function "' . $funcName . '" is already associated with the template.');
}
}