function __construct($name, $opts = 0) { parent::__construct($name, $opts); global $server_dir, $web_dir; if (($opts & controller::NOTEMPLATE) == 0) { $this->template = new Template($name); $this->template->assign("dir", array('server' => $server_dir, 'web' => $web_dir, 'controller' => $server_dir . "/web/" . $name . "/template/")); } if (($opts & self::NOMODULE) == 0) { $path = $server_dir . "/web/" . $name . "/module.php"; if (file_exists($path)) { $this->ownmodule = dispatcher::loadModule($name); } $this->module = new modulehelper(); } #TODO: check if this is alright... #TODO: maybe think for a better name... $this->postData = new post($name); }