| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- Lib::loadClass('ThemeDefault');
- class Theme {
- public static function getInstance() {
- static $_theme = null;
- DBG::log($_theme, 'array', "Theme::getInstance()...");
- if (null !== $_theme) return $_theme;
- try {
- $themeName = ''; // TODO: read from config - theme
- // $themeName = 'Bocian'; // TODO: DBG
- DBG::log("Theme::getInstance({$themeName})");
- $clsName = ($themeName) ? "Theme_{$themeName}" : "ThemeDefault";
- Lib::loadClass($clsName);
- $_theme = new $clsName();
- } catch (Exception $e) {
- DBG::log($e);
- $_theme = new ThemeDefault();
- }
- return $_theme;
- }
- public static function head() {
- return self::getInstance()->head(); // <link rel="stylesheet" href="stuff/bootstrap/css/bootstrap-theme.min.css" type="text/css" />';
- }
- public static function top() { // old menu
- return self::getInstance()->top();
- }
- public static function footer() {
- return self::getInstance()->footer();
- }
- public static function login($data) {
- return self::getInstance()->login($data);
- }
- public static function logout($data) {
- return self::getInstance()->logout($data);
- }
- public static function home($data) {
- return self::getInstance()->home($data);
- }
- }
|