PHP 클래스 Container_users

파일 보기 프로젝트 열기: kerphi/phpfreechat 1 사용 예제들

공개 메소드들

메소드 설명
checkUserExists ( $uid )
generateUid ( $uid = null )
getDir ( )
getUserChannels ( $uid, $injson = false )
getUserData ( $uid, $field = null, $injson = false ) Get user's data Can be called to read only one field If $injson is true, data are returned json encoded getUserData('xxxx', 'email'); getUserData('xxxx', null, true);
getUserMsgs ( $uid, $injson = false )
getUsers ( )
joinChannel ( $uid, $cid )
leaveChannel ( $uid, $cid )
rmUser ( $uid ) Remove user's data
runGC ( ) Run the garbage collector (disconnect timeouted users) Has to be called by each users when they check pending messages
setCloseFlag ( $uid ) Update the close flag of a user Called when the user close his window or reload his window
setIsAlive ( $uid ) Update the last activity of a user Has to be called each time the user check his messages
setUserData ( $uid, $userdata ) Set user's data Can be called to update only one field setUserData('xxxx', array('email', '[email protected]'));

메소드 상세

checkUserExists() 공개 정적인 메소드

public static checkUserExists ( $uid )

generateUid() 공개 정적인 메소드

public static generateUid ( $uid = null )

getDir() 공개 정적인 메소드

public static getDir ( )

getUserChannels() 공개 정적인 메소드

public static getUserChannels ( $uid, $injson = false )

getUserData() 공개 정적인 메소드

Get user's data Can be called to read only one field If $injson is true, data are returned json encoded getUserData('xxxx', 'email'); getUserData('xxxx', null, true);
public static getUserData ( $uid, $field = null, $injson = false )

getUserMsgs() 공개 정적인 메소드

public static getUserMsgs ( $uid, $injson = false )

getUsers() 공개 정적인 메소드

public static getUsers ( )

joinChannel() 공개 정적인 메소드

public static joinChannel ( $uid, $cid )

leaveChannel() 공개 정적인 메소드

public static leaveChannel ( $uid, $cid )

rmUser() 공개 정적인 메소드

Remove user's data
public static rmUser ( $uid )

runGC() 공개 정적인 메소드

Run the garbage collector (disconnect timeouted users) Has to be called by each users when they check pending messages
public static runGC ( )

setCloseFlag() 공개 정적인 메소드

Update the close flag of a user Called when the user close his window or reload his window
public static setCloseFlag ( $uid )

setIsAlive() 공개 정적인 메소드

Update the last activity of a user Has to be called each time the user check his messages
public static setIsAlive ( $uid )

setUserData() 공개 정적인 메소드

Set user's data Can be called to update only one field setUserData('xxxx', array('email', '[email protected]'));
public static setUserData ( $uid, $userdata )