request = new MediaListing_RequestParser($request_string, $this->template_dir, $this->template_code_dir); if (ML_File == 'index') { $this->smarty = new Smarty(); $this->smarty->template_dir = $this->template_dir; $this->smarty->compile_dir = '../private/tmp/templates'; $this->smarty->cache_dir = '../private/tmp/cache'; $this->smarty->config_dir = '../private/tmp/config'; $this->smarty->registerPlugin('modifier', 'formatDuration', array('MediaListing_Main', 'formatDuration')); $this->smarty->registerPlugin('modifier', 'formatFilesize', array('MediaListing_Main', 'formatFilesize')); $this->smarty->assign('title', 'Media Listing'); $this->smarty->assign('version', '0.1'); $this->smarty->assign('messages', array()); $this->smarty->assign('base_uri', $this->base_uri); } } /** * Returns the directory where page templates can be found * * @return string */ public function templateDir() { return $this->template_dir; } /** * * @return Smarty */ public function smarty() { return $this->smarty; } /** * * @return MediaListing_RequestParser */ public function request() { return $this->request; } } ?>