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