PHP 클래스 erLhcoreClassChat

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

공개 프로퍼티들

프로퍼티 타입 설명
$chatListIgnoreField
$onlineCondition
$trackActivity Static attribute for class
$trackTimeout

공개 메소드들

메소드 설명
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 )

메소드 상세

canReopen() 공개 정적인 메소드

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

canReopenDirectly() 공개 정적인 메소드

public static canReopenDirectly ( $params = [] )

closeChatCallback() 공개 정적인 메소드

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

formatDate() 공개 정적인 메소드

public static formatDate ( $ts )

formatSeconds() 공개 정적인 메소드

public static formatSeconds ( $seconds )

generateHash() 공개 정적인 메소드

public static generateHash ( )

getActiveChats() 공개 정적인 메소드

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

getActiveChatsCount() 공개 정적인 메소드

public static getActiveChatsCount ( $filterAdditional = [] )

getAdjustment() 공개 정적인 메소드

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

getChatDurationToUpdateChatID() 공개 정적인 메소드

public static getChatDurationToUpdateChatID ( $chatID )

getChatMessages() 공개 정적인 메소드

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

getClosedChats() 공개 정적인 메소드

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

getClosedChatsCount() 공개 정적인 메소드

public static getClosedChatsCount ( $filterAdditional = [] )

getCount() 공개 정적인 메소드

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

getDepartmentLimitation() 공개 정적인 메소드

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

getFirstUserMessage() 공개 정적인 메소드

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

getGetLastChatMessage() 공개 정적인 메소드

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

getGetLastChatMessageEdit() 공개 정적인 메소드

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

getGetLastChatMessagePending() 공개 정적인 메소드

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

getList() 공개 정적인 메소드

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

getLoggedDepartmentsIds() 공개 정적인 메소드

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

getOnlineUsers() 공개 정적인 메소드

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

getOperatorsChats() 공개 정적인 메소드

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

getOperatorsChatsCount() 공개 정적인 메소드

public static getOperatorsChatsCount ( $filterAdditional = [] )

getPendingChats() 공개 정적인 메소드

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

getPendingChatsCount() 공개 정적인 메소드

public static getPendingChatsCount ( $filterAdditional = [] )

getPendingChatsCountPublic() 공개 정적인 메소드

public static getPendingChatsCountPublic ( $department = false )

getPendingMessages() 공개 정적인 메소드

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

getPendingMessagesChatbox() 공개 정적인 메소드

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

getRandomOnlineUserID() 공개 정적인 메소드

public static getRandomOnlineUserID ( $params = [] )

getSession() 공개 정적인 메소드

public static getSession ( )

getUnreadMessagesChats() 공개 정적인 메소드

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

getUnreadMessagesChatsCount() 공개 정적인 메소드

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

hasAccessToRead() 공개 정적인 메소드

public static hasAccessToRead ( $chat )

isChatActive() 공개 정적인 메소드

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

isOnline() 공개 정적인 메소드

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

isOnlineUser() 공개 정적인 메소드

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

prefillGetAttributes() 공개 정적인 메소드

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

prefillGetAttributesObject() 공개 정적인 메소드

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

prefillObjects() 공개 정적인 메소드

* 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() 공개 정적인 메소드

또한 보기: https://github.com/LiveHelperChat/livehelperchat/pull/809
public static safe_json_encode ( array $value )
$value array

setActivityByChatAndOnlineUser() 공개 정적인 메소드

public static setActivityByChatAndOnlineUser ( $chat, erLhcoreClassModelChatOnlineUser $onlineUser ) : integer
$onlineUser erLhcoreClassModelChatOnlineUser
리턴 integer

setOnlineStatus() 공개 정적인 메소드

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

setOnlineStatusDirectly() 공개 정적인 메소드

Sets chats status directly
public static setOnlineStatusDirectly ( $chatLists )

setTimeZoneByChat() 공개 정적인 메소드

public static setTimeZoneByChat ( $chat )

updateActiveChats() 공개 정적인 메소드

public static updateActiveChats ( $user_id )

updateDepartmentStats() 공개 정적인 메소드

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

utf8ize() 공개 정적인 메소드

Make conversion if required
public static utf8ize ( unknown $mixed ) : string
$mixed unknown
리턴 string

validateFilterIn() 공개 정적인 메소드

public static validateFilterIn ( &$params )

프로퍼티 상세

$chatListIgnoreField 공개적으로 정적으로 프로퍼티

public static $chatListIgnoreField

$onlineCondition 공개적으로 정적으로 프로퍼티

public static $onlineCondition

$trackActivity 공개적으로 정적으로 프로퍼티

Static attribute for class
public static $trackActivity

$trackTimeout 공개적으로 정적으로 프로퍼티

public static $trackTimeout