Class Chat

Description

TAM AG CMS

  • author: DevilDev

Located in /chat/Chat.php (line 11)

Modules
   |
   --Chat
Variable Summary
static Chat $_instance
Method Summary
static Chat getInstance ()
type getAgentMessage (int $last_id, int $thread_id, User $user, [int $is_first = 0])
array getMessages (int $last_id, int $thread_id, [int $is_first = 0])
string loadAdminHtml ()
string loadChatButtonHtml ()
string loadChatHtml ()
string postMessage (int $thread_id, string $message, User $agent, [string $user_name = null], [string $user_email = null])
Variables
static Chat $_instance = null (line 18)

Singleton instance

  • access: protected
Methods
static method getInstance (line 28)

Returns an instance of Chat

Singleton pattern implementation

  • return: Provides a fluent interface
  • access: public
static Chat getInstance ()
getAgentMessage (line 171)

Load all messages for agent

  • access: public
type getAgentMessage (int $last_id, int $thread_id, User $user, [int $is_first = 0])
  • int $last_id
  • int $thread_id
  • User $user
  • int $is_first
getCountThreadsActive (line 322)
  • access: public
void getCountThreadsActive ()
getMessages (line 68)

Load all message for current chat

  • return: chat data
  • access: public
array getMessages (int $last_id, int $thread_id, [int $is_first = 0])
  • int $last_id: last id message
  • int $thread_id: current thread id
  • int $is_first: if is first load
loadAdminHtml (line 205)

Create admin html for chat

Allow variable
$lines - html all thread lines chats
$pagination - html paginator
Incoming variable
$limit - int limit threads per page
$pages - int current page

  • return: html admin page
  • access: public
string loadAdminHtml ()
loadChatButtonHtml (line 273)

Create html button chat

Allow variable
$user - is JSON object User

  • return: html button for chat
  • access: public
string loadChatButtonHtml ()
loadChatHtml (line 43)

Create html chat form

Allow variable
$agent - int if this user role > 3

  • return: html chat form
  • access: public
string loadChatHtml ()
postMessage (line 295)

Add new message in current chat

  • return: with current method _getMessages
  • access: public
string postMessage (int $thread_id, string $message, User $agent, [string $user_name = null], [string $user_email = null])
  • int $thread_id
  • string $message
  • User $agent
  • string $user_name
  • string $user_email

Documentation generated on Fri, 19 Aug 2016 17:10:29 +0200 by phpDocumentor 1.4.3