PHP Class erLhcoreClassChat

Afficher le fichier Open project: remdex/livehelperchat Class Usage Examples

Méthodes publiques

Свойство Type Description
$chatListIgnoreField
$onlineCondition
$trackActivity Static attribute for class
$trackTimeout

Méthodes publiques

Méthode Description
canReopen ( erLhcoreClassModelChat $chat, $skipStatusCheck = false )
canReopenDirectly ( $params = [] )
closeChatCallback ( $chat, $operator = false )
formatDate ( $ts )
formatSeconds ( $seconds )
generateHash ( )
getActiveChats ( $limit = 50, $offset, $filterAdditional = [] )
getActiveChatsCount ( $filterAdditional = [] )
getAdjustment ( $geo_adjustment, $onlineUserVid = '', $widgetMode = false, $onlineUserDefined = false )
getChatDurationToUpdateChatID ( $chatID )
getChatMessages ( $chat_id ) Gets chats messages, used to review chat etc.
getClosedChats ( $limit = 50, $offset, $filterAdditional = [] )
getClosedChatsCount ( $filterAdditional = [] )
getCount ( $params = [], $table = 'lh_chat', $operation = 'COUNT(id)' )
getDepartmentLimitation ( $tableName = 'lh_chat', $params = [] )
getFirstUserMessage ( $chat_id ) Get first user mesasge for prefilling chat
getGetLastChatMessage ( $chat_id ) Get last message for chatbox
getGetLastChatMessageEdit ( $chat_id, $user_id ) Get last message for chat editing admin last message
getGetLastChatMessagePending ( $chat_id ) Get last message for browser notification
getList ( $paramsSearch = [], $class = 'erLhcoreClassModelChat', $tableName = 'lh_chat' )
getLoggedDepartmentsIds ( $departmentsIds, $exclipic = false ) Returns departments with atleast one logged
getOnlineUsers ( $UserID = [], $params = [] )
getOperatorsChats ( $limit = 50, $offset, $filterAdditional = [] )
getOperatorsChatsCount ( $filterAdditional = [] )
getPendingChats ( $limit = 50, $offset, $filterAdditional = [], $filterAdditionalMainAttr = [], $limitationDepartment = [] ) Gets pending chats
getPendingChatsCount ( $filterAdditional = [] )
getPendingChatsCountPublic ( $department = false )
getPendingMessages ( $chat_id, $message_id ) All messages, which should get administrator/user
getPendingMessagesChatbox ( $chat_id, $message_id ) All messages, which should get administrator/user for chatbox
getRandomOnlineUserID ( $params = [] )
getSession ( )
getUnreadMessagesChats ( $limit = 10, $offset, $filterAdditional = [] ) Get's unread messages from users
getUnreadMessagesChatsCount ( $filterAdditional = [] ) Get's unread messages from users | COUNT
hasAccessToRead ( $chat )
isChatActive ( $chat_id, $hash ) Is chat activated and user can send messages.
isOnline ( $dep_id = false, $exclipic = false, $params = [] )
isOnlineUser ( $user_id, $params = [] )
prefillGetAttributes ( &$objects, $attrs = [], $attrRemove = [], $params = [] ) Is there any better way to initialize __get variables?
prefillGetAttributesObject ( &$object, $attrs = [], $attrRemove = [], $params = [] ) Is there any better way to initialize __get variables?
prefillObjects ( &$objects, $attrs = [], $params = [] ) * Example of call This method can prefill first and second level objects without requirement for each object to be fetched separately Increases performance drastically erLhcoreClassModuleFunctions::prefillObjects($items, array( array( 'order_id', 'order', 'dommyClass::getList' ), array( 'status_id', 'status', 'dommyClass::getList' ), array( array( 'order', 'registration_id' ), array( 'order', 'registration' ), 'dommyClass::getList', 'id' ) ));
safe_json_encode ( array $value )
setActivityByChatAndOnlineUser ( $chat, erLhcoreClassModelChatOnlineUser $onlineUser ) : integer
setOnlineStatus ( $chatLists ) Sets chat's status by online visitors records in efficient way
setOnlineStatusDirectly ( $chatLists ) Sets chats status directly
setTimeZoneByChat ( $chat )
updateActiveChats ( $user_id )
updateDepartmentStats ( $dep ) Update department main statistic for frontend
utf8ize ( unknown $mixed ) : string Make conversion if required
validateFilterIn ( &$params )

Method Details

canReopen() public static méthode

public static canReopen ( erLhcoreClassModelChat $chat, $skipStatusCheck = false )
$chat erLhcoreClassModelChat

canReopenDirectly() public static méthode

public static canReopenDirectly ( $params = [] )

closeChatCallback() public static méthode

public static closeChatCallback ( $chat, $operator = false )

formatDate() public static méthode

public static formatDate ( $ts )

formatSeconds() public static méthode

public static formatSeconds ( $seconds )

generateHash() public static méthode

public static generateHash ( )

getActiveChats() public static méthode

public static getActiveChats ( $limit = 50, $offset, $filterAdditional = [] )

getActiveChatsCount() public static méthode

public static getActiveChatsCount ( $filterAdditional = [] )

getAdjustment() public static méthode

public static getAdjustment ( $geo_adjustment, $onlineUserVid = '', $widgetMode = false, $onlineUserDefined = false )

getChatDurationToUpdateChatID() public static méthode

public static getChatDurationToUpdateChatID ( $chatID )

getChatMessages() public static méthode

Gets chats messages, used to review chat etc.
public static getChatMessages ( $chat_id )

getClosedChats() public static méthode

public static getClosedChats ( $limit = 50, $offset, $filterAdditional = [] )

getClosedChatsCount() public static méthode

public static getClosedChatsCount ( $filterAdditional = [] )

getCount() public static méthode

public static getCount ( $params = [], $table = 'lh_chat', $operation = 'COUNT(id)' )

getDepartmentLimitation() public static méthode

public static getDepartmentLimitation ( $tableName = 'lh_chat', $params = [] )

getFirstUserMessage() public static méthode

Get first user mesasge for prefilling chat
public static getFirstUserMessage ( $chat_id )

getGetLastChatMessage() public static méthode

Get last message for chatbox
public static getGetLastChatMessage ( $chat_id )

getGetLastChatMessageEdit() public static méthode

Get last message for chat editing admin last message
public static getGetLastChatMessageEdit ( $chat_id, $user_id )

getGetLastChatMessagePending() public static méthode

Get last message for browser notification
public static getGetLastChatMessagePending ( $chat_id )

getList() public static méthode

public static getList ( $paramsSearch = [], $class = 'erLhcoreClassModelChat', $tableName = 'lh_chat' )

getLoggedDepartmentsIds() public static méthode

Returns departments with atleast one logged
public static getLoggedDepartmentsIds ( $departmentsIds, $exclipic = false )

getOnlineUsers() public static méthode

public static getOnlineUsers ( $UserID = [], $params = [] )

getOperatorsChats() public static méthode

public static getOperatorsChats ( $limit = 50, $offset, $filterAdditional = [] )

getOperatorsChatsCount() public static méthode

public static getOperatorsChatsCount ( $filterAdditional = [] )

getPendingChats() public static méthode

Gets pending chats
public static getPendingChats ( $limit = 50, $offset, $filterAdditional = [], $filterAdditionalMainAttr = [], $limitationDepartment = [] )

getPendingChatsCount() public static méthode

public static getPendingChatsCount ( $filterAdditional = [] )

getPendingChatsCountPublic() public static méthode

public static getPendingChatsCountPublic ( $department = false )

getPendingMessages() public static méthode

All messages, which should get administrator/user
public static getPendingMessages ( $chat_id, $message_id )

getPendingMessagesChatbox() public static méthode

All messages, which should get administrator/user for chatbox
public static getPendingMessagesChatbox ( $chat_id, $message_id )

getRandomOnlineUserID() public static méthode

public static getRandomOnlineUserID ( $params = [] )

getSession() public static méthode

public static getSession ( )

getUnreadMessagesChats() public static méthode

Get's unread messages from users
public static getUnreadMessagesChats ( $limit = 10, $offset, $filterAdditional = [] )

getUnreadMessagesChatsCount() public static méthode

Get's unread messages from users | COUNT
public static getUnreadMessagesChatsCount ( $filterAdditional = [] )

hasAccessToRead() public static méthode

public static hasAccessToRead ( $chat )

isChatActive() public static méthode

Is chat activated and user can send messages.
public static isChatActive ( $chat_id, $hash )

isOnline() public static méthode

public static isOnline ( $dep_id = false, $exclipic = false, $params = [] )

isOnlineUser() public static méthode

public static isOnlineUser ( $user_id, $params = [] )

prefillGetAttributes() public static méthode

Is there any better way to initialize __get variables?
public static prefillGetAttributes ( &$objects, $attrs = [], $attrRemove = [], $params = [] )

prefillGetAttributesObject() public static méthode

Is there any better way to initialize __get variables?
public static prefillGetAttributesObject ( &$object, $attrs = [], $attrRemove = [], $params = [] )

prefillObjects() public static méthode

* Example of call This method can prefill first and second level objects without requirement for each object to be fetched separately Increases performance drastically erLhcoreClassModuleFunctions::prefillObjects($items, array( array( 'order_id', 'order', 'dommyClass::getList' ), array( 'status_id', 'status', 'dommyClass::getList' ), array( array( 'order', 'registration_id' ), array( 'order', 'registration' ), 'dommyClass::getList', 'id' ) ));
public static prefillObjects ( &$objects, $attrs = [], $params = [] )

safe_json_encode() public static méthode

See also: https://github.com/LiveHelperChat/livehelperchat/pull/809
public static safe_json_encode ( array $value )
$value array

setActivityByChatAndOnlineUser() public static méthode

public static setActivityByChatAndOnlineUser ( $chat, erLhcoreClassModelChatOnlineUser $onlineUser ) : integer
$onlineUser erLhcoreClassModelChatOnlineUser
Résultat integer

setOnlineStatus() public static méthode

Sets chat's status by online visitors records in efficient way
public static setOnlineStatus ( $chatLists )

setOnlineStatusDirectly() public static méthode

Sets chats status directly
public static setOnlineStatusDirectly ( $chatLists )

setTimeZoneByChat() public static méthode

public static setTimeZoneByChat ( $chat )

updateActiveChats() public static méthode

public static updateActiveChats ( $user_id )

updateDepartmentStats() public static méthode

Update department main statistic for frontend
public static updateDepartmentStats ( $dep )

utf8ize() public static méthode

Make conversion if required
public static utf8ize ( unknown $mixed ) : string
$mixed unknown
Résultat string

validateFilterIn() public static méthode

public static validateFilterIn ( &$params )

Property Details

$chatListIgnoreField public_oe static_oe property

public static $chatListIgnoreField

$onlineCondition public_oe static_oe property

public static $onlineCondition

$trackActivity public_oe static_oe property

Static attribute for class
public static $trackActivity

$trackTimeout public_oe static_oe property

public static $trackTimeout