示例#1
0
 /**
  * Load template part with parameters
  *
  * @param string $template_name template name
  * @param array $params - associative array with
  *                      variable_name => variable_value
  *                      then in template will be available $variable_name
  *
  * @return string
  * @access public
  * @since 0.2
  * @author Michal Kalkowski <michal at silversite.pl>
  */
 function get_template_part($template_name, array $params = array())
 {
     try {
         if (File::exists(TEMPLATEPATH . '/' . $template_name)) {
             extract($params);
             return include locate_template("{$template_name}.php");
         }
     } catch (FileException $ex) {
         $ex->catchException();
     }
 }
示例#2
0
 /**
  * Download settings file
  *
  * @access public
  */
 public function download()
 {
     File::download($this->settings_file_path);
 }