Package | com.smartfoxserver.v2.entities.managers |
Class | public class SFSUserManager |
Inheritance | SFSUserManager Object |
Implements | IUserManager |
See also
Property | Defined By | ||
---|---|---|---|
userCount : int [read-only]
Returns the total number of users in the local users list. | SFSUserManager |
Method | Defined By | ||
---|---|---|---|
SFSUserManager(sfs:SmartFox)
Creates a new SFSUserManager instance. | SFSUserManager | ||
containsUser(user:User):Boolean
Indicates whether a user exists in the local users list or not. | SFSUserManager | ||
containsUserId(userId:int):Boolean
Indicates whether a user exists in the local users list or not from the id. | SFSUserManager | ||
containsUserName(userName:String):Boolean
Indicates whether a user exists in the local users list or not from the name. | SFSUserManager | ||
getUserById(userId:int):User
Retrieves a User object from its id property. | SFSUserManager | ||
getUserByName(userName:String):User
Retrieves a User object from its name property. | SFSUserManager | ||
getUserList():Array
Get the whole list of users inside the Rooms joined by the client. | SFSUserManager |
userCount | property |
userCount:int
[read-only] Returns the total number of users in the local users list.
public function get userCount():int
SFSUserManager | () | Constructor |
public function SFSUserManager(sfs:SmartFox)
Creates a new SFSUserManager instance.
NOTE: developers never instantiate a SFSUserManager manually: this is done by the SmartFoxServer 2X API internally. A reference to the existing instance can be retrieved using the SmartFox.userManager property.
Parameterssfs:SmartFox — An instance of the SmartFoxServer 2X client API main SmartFox class.
|
See also
clearAll | () | method |
kernel function clearAll():void
containsUser | () | method |
public function containsUser(user:User):Boolean
Indicates whether a user exists in the local users list or not.
Parameters
user:User — The User object representing the user whose presence in the users list is to be tested.
|
Boolean — true if the passed user exists in the users list.
|
containsUserId | () | method |
public function containsUserId(userId:int):Boolean
Indicates whether a user exists in the local users list or not from the id.
Parameters
userId:int — The id of the user whose presence in the users list is to be tested.
|
Boolean — true if the passed user exists in the users list.
|
containsUserName | () | method |
public function containsUserName(userName:String):Boolean
Indicates whether a user exists in the local users list or not from the name.
Parameters
userName:String — The name of the user whose presence in the users list is to be tested.
|
Boolean — true if the passed user exists in the users list.
|
getUserById | () | method |
public function getUserById(userId:int):User
Retrieves a User object from its id property.
Parameters
userId:int — The id of the user to be found.
|
User — The User object representing the user, or null if no user with the passed id exists in the local users list.
|
getUserByName | () | method |
public function getUserByName(userName:String):User
Retrieves a User object from its name property.
Parameters
userName:String — The name of the user to be found.
|
User — The User object representing the user, or null if no user with the passed name exists in the local users list.
|
getUserList | () | method |
public function getUserList():Array
Get the whole list of users inside the Rooms joined by the client.
ReturnsArray — The list of User objects representing the users in the local users list.
|