PHP Класс Container_users

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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 )