Example #1
0
 /**
  *  Create an instance of this class
  */
 public static function getInstance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Example #2
0
 /**
  * Initialize theme.
  */
 private function _initTheme()
 {
     $retval = true;
     $this->addTrace(__FUNCTION__);
     $this->_theme = CSpTheme::getInstance();
     if (is_null($this->_theme)) {
         $retval = false;
         $this->addTrace('ERR: Unable to create theme object.');
     } else {
         $retval = $this->_theme->init(__SP_USE_THEME);
         if ($retval == false) {
             $this->addTrace('ERR: Unable to initialize theme.');
         }
     }
     return $retval;
 }