public static function getInstance() { if (is_null(self::$instance)) { self::$instance = new Singleton(); } return self::$instance; }
/** * 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; }
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']); }
private static function contest($year) { return \template::instance()->render($year . '/index.html'); }