public function views() { $a = func_get_args(); $a = join('/', $a); $re = '@\\.(' . join('|', $_SERVER['allowed_dynamic_media']) . ')$@'; if (!preg_match($re, $a)) { throw new HTTPNotFound(); } $this->content_type = lib::content_type_from_extension($a); if (!file_exists($this->view->template_dir . '/' . $a)) { $a .= ".tpl"; if (!file_exists($this->view->template_dir . '/' . $a)) { throw new HTTPNotFound(); } $this->tplprocess = true; } $this->viewname = $a; }