Messenger uses ContextCustomer
Table of Contents
Methods
- checkAccessibility() : Result
- createChat() : Result
- createMessage() : Message
- deleteMessage() : Result
- Delete message
- deleteTask() : void
- Call when task delete from recycle bin
- disappearMessage() : Result
- Disappear message
- getChat() : Chat
- getContext() : Context
- Returns the local or global context for the action.
- getEntityChat() : EntityChat|GroupChat|NullChat
- getGeneralChat() : Chat
- getInstance() : self
- Returns current instance of the Messenger.
- getPrivateChat() : NullChat|PrivateChat
- registerTask() : void
- setContext() : self
- Sets new context for operations.
- setContextUser() : self
- unregisterCalendar() : void
- unregisterTask() : void
- Call when tasks delete to recycle bin or totally
- updateCalendar() : void
- updateMessage() : Result
- Update message
- updateTask() : void
- withContext() : static
- Provides local context for the action.
- withContextUser() : static
- Provides local context for the action.
Methods
checkAccessibility()
public
checkAccessibility() : Result
Return values
ResultcreateChat()
public
createChat(array<string|int, mixed> $fields) : Result
Parameters
- $fields : array<string|int, mixed>
Return values
ResultcreateMessage()
public
createMessage([array<string|int, mixed>|string|null $source = null ]) : Message
Parameters
- $source : array<string|int, mixed>|string|null = null
Return values
MessagedeleteMessage()
Delete message
public
deleteMessage(Message $message[, int $mode = 0 ]) : Result
Parameters
- $message : Message
- $mode : int = 0
-
DeleteService::MODE_AUTO|DeleteService::MODE_SOFT|DeleteService::MODE_HARD|DeleteService::MODE_COMPLETE
Return values
ResultdeleteTask()
Call when task delete from recycle bin
public
deleteTask(int $taskId) : void
Parameters
- $taskId : int
disappearMessage()
Disappear message
public
disappearMessage(Message $message, int $hours) : Result
Parameters
- $message : Message
- $hours : int
Return values
ResultgetChat()
public
getChat(int $chatId) : Chat
Parameters
- $chatId : int
Return values
ChatgetContext()
Returns the local or global context for the action.
public
getContext() : Context
Return values
ContextgetEntityChat()
public
getEntityChat(string $entityType, int|string $entityId) : EntityChat|GroupChat|NullChat
Parameters
- $entityType : string
- $entityId : int|string
Return values
EntityChat|GroupChat|NullChatgetGeneralChat()
public
getGeneralChat() : Chat
Return values
ChatgetInstance()
Returns current instance of the Messenger.
public
static getInstance() : self
Return values
selfgetPrivateChat()
public
getPrivateChat(int $fromUserId, int $toUserId) : NullChat|PrivateChat
Parameters
- $fromUserId : int
- $toUserId : int
Return values
NullChat|PrivateChatregisterTask()
public
registerTask(int $chatId, int $messageId, TaskObject $task) : void
Parameters
- $chatId : int
- $messageId : int
- $task : TaskObject
setContext()
Sets new context for operations.
public
setContext(Context|null $context) : self
Parameters
- $context : Context|null
Return values
selfsetContextUser()
public
setContextUser(mixed $user) : self
Parameters
- $user : mixed
Return values
selfunregisterCalendar()
public
static unregisterCalendar(int $eventId, array<string|int, mixed> $entry) : void
Parameters
- $eventId : int
- $entry : array<string|int, mixed>
unregisterTask()
Call when tasks delete to recycle bin or totally
public
unregisterTask(array<string|int, mixed> $taskData, bool $saveDelete) : void
Parameters
- $taskData : array<string|int, mixed>
- $saveDelete : bool
updateCalendar()
public
static updateCalendar(int $eventId, array<string|int, mixed> $entryFields) : void
Parameters
- $eventId : int
- $entryFields : array<string|int, mixed>
updateMessage()
Update message
public
updateMessage(Message $message, string|null $messageText) : Result
Parameters
- $message : Message
- $messageText : string|null
Return values
ResultupdateTask()
public
updateTask(TaskObject $task) : void
Parameters
- $task : TaskObject
withContext()
Provides local context for the action.
public
withContext(Context|null $context) : static
Parameters
- $context : Context|null
Return values
staticwithContextUser()
Provides local context for the action.
public
withContextUser(int|User|User $user) : static
Parameters
- $user : int|User|User