Beispiel #1
0
 public static function getInstance()
 {
     if (is_null(self::$instance)) {
         self::$instance = new Singleton();
     }
     return self::$instance;
 }
Beispiel #2
0
 /**
  * Creation/Recuperation de la class template
  *
  * @param  string $name
  * @return template
  */
 static function getInstance($name = null)
 {
     if (is_null(template::$instance) && !is_null($name)) {
         template::$instance = new template($name);
     }
     return template::$instance;
 }
Beispiel #3
0
 static function getInstance()
 {
     if (is_null(template::$instance)) {
         template::$instance = new template();
     }
     return template::$instance;
 }
 /**
  * 
  */
 protected function mf_AssignMessages()
 {
     $this->tpl = template::instance();
     $this->tpl->assign('arrMessageLevels', $this->m_arrMessageLevels);
     $arrMsgs = $this->mf_GetMessages();
     arsort($arrMsgs['level'], SORT_NUMERIC);
     $arrMessages = array();
     foreach ($arrMsgs['level'] as $k => $iLevel) {
         $arrMessages[] = array('level' => $iLevel, 'msg' => $arrMsgs['msg'][$k]);
     }
     $this->tpl->assign('arrMessages', $arrMessages);
     $szMessages = 0 < count($arrMessages) ? $this->tpl->fetch('messages.tpl.html') : '';
     $this->tpl->assign('szMessages', $szMessages);
     unset($this->tpl->smarty->_tpl_vars['arrMessages'], $this->tpl->smarty->_tpl_vars['arrMessageLevels']);
 }
Beispiel #5
0
 private static function contest($year)
 {
     return \template::instance()->render($year . '/index.html');
 }