_variables[$name] = $value; } /** * render a template * * @access public * @param string $template * @throws Exception */ public function draw($template) { $file = substr($template, 0, 9) === 'bootstrap' ? 'bootstrap' : $template; $path = PATH . 'tpl' . DIRECTORY_SEPARATOR . $file . '.php'; if (!file_exists($path)) { throw new Exception('Template ' . $template . ' not found!', 80); } extract($this->_variables); include $path; } }