Example #1
0
 /**
  * GetInstance() - Enfore the Singleton of the core.
  *
  * @param boolean $instance_must_exist
  * @return Zend_Session_Core
  */
 public static function getInstance($instance_must_exist = false)
 {
     if (self::$_instance === null && $instance_must_exist === true) {
         throw new Zend_Session_Exception(__CLASS__ . "::getInstance() A valid session must exist before calling getInstance() in this manner.");
     }
     if (self::$_instance === null) {
         self::$_singleton = true;
         self::$_instance = new self();
     }
     return self::$_instance;
 }