protected function getRequiredTemplateVariable($name)
    {
        if(!array_key_exists($name, $this->templateVars))
            throw new ControllerException('Required template variable ['.$name.'] is missing');

        return $this->templateVars[$name];
    }