Example #1
0
 /**
  * Возвращет единственный экземпляр данного класса.
  * @return object - объект класса URL.
  */
 public static function getInstance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Example #2
0
 public static function instance()
 {
     if (self::$_instance == null) {
         self::$_instance = new User();
     }
     return self::$_instance;
 }
Example #3
0
 public static function Instance()
 {
     if (!self::$_instance instanceof self) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
Example #4
0
  static public function instance()
  {
    if (!self :: $_instance)
      self :: $_instance = instantiateSessionObject('user');

    return self :: $_instance;
  }
Example #5
0
 /**
  * function update return a new User object of current user
  *
  * @return User object
  * @static
  * @access public
  */
 public static function update()
 {
     self::$_instance = null;
     return User::getInstance();
 }