CounterServiceLegacy extends CounterService
Table of Contents
Methods
- __construct() : mixed
- addCollection() : void
- addForEachUser() : void
- addStartingFrom() : void
- clearCache() : void
- deleteAll() : void
- deleteByChatId() : void
- deleteByChatIdForAll() : void
- deleteByChatIds() : void
- deleteByMessageForAll() : void
- deleteByMessagesForAll() : void
- deleteCountersOfFiredUserAgent() : string
- deleteExpiredCountersAgent() : string
- deleteTo() : void
- get() : array<string|int, mixed>
- getByChat() : int
- getByChatForEachUsers() : array<string|int, mixed>
- getChildrenWithCounters() : array<string|int, mixed>
- getContext() : Context
- Returns the local or global context for the action.
- getForEachChat() : array<string|int, mixed>
- getForNotifyChat() : int
- getForNotifyChats() : array<string|int, mixed>
- getIdFirstUnreadMessage() : int|null
- getIdFirstUnreadMessageForEachChats() : array<string|int, mixed>
- getTotal() : int
- onAfterUserUpdate() : void
- setContext() : self
- Sets new context for operations.
- setContextUser() : self
- updateIsMuted() : void
- withContext() : static
- Provides local context for the action.
- withContextUser() : static
- Provides local context for the action.
Methods
__construct()
public
__construct([int|null $userId = null ]) : mixed
Parameters
- $userId : int|null = null
addCollection()
public
addCollection(MessageCollection $messages, Relation $relation) : void
Parameters
- $messages : MessageCollection
- $relation : Relation
addForEachUser()
public
addForEachUser(Message $message, RelationCollection $relations) : void
Parameters
- $message : Message
- $relations : RelationCollection
addStartingFrom()
public
addStartingFrom(int $messageId, Relation $relation) : void
Parameters
- $messageId : int
- $relation : Relation
clearCache()
public
static clearCache([int|null $userId = null ]) : void
Parameters
- $userId : int|null = null
deleteAll()
public
deleteAll([bool $withNotify = false ]) : void
Parameters
- $withNotify : bool = false
Tags
deleteByChatId()
public
deleteByChatId(int $chatId) : void
Parameters
- $chatId : int
deleteByChatIdForAll()
public
static deleteByChatIdForAll(int $chatId) : void
Parameters
- $chatId : int
deleteByChatIds()
public
deleteByChatIds(array<string|int, mixed> $chatIds) : void
Parameters
- $chatIds : array<string|int, mixed>
deleteByMessageForAll()
public
deleteByMessageForAll(Message $message[, array<string|int, mixed>|null $invalidateCacheUsers = null ]) : void
Parameters
- $message : Message
- $invalidateCacheUsers : array<string|int, mixed>|null = null
deleteByMessagesForAll()
public
deleteByMessagesForAll(MessageCollection $messages[, array<string|int, mixed>|null $invalidateCacheUsers = null ]) : void
Parameters
- $messages : MessageCollection
- $invalidateCacheUsers : array<string|int, mixed>|null = null
deleteCountersOfFiredUserAgent()
public
static deleteCountersOfFiredUserAgent(int $userId) : string
Parameters
- $userId : int
Return values
stringdeleteExpiredCountersAgent()
public
static deleteExpiredCountersAgent() : string
Return values
stringdeleteTo()
public
deleteTo(Message $message) : void
Parameters
- $message : Message
get()
public
get() : array<string|int, mixed>
Return values
array<string|int, mixed>getByChat()
public
getByChat(int $chatId) : int
Parameters
- $chatId : int
Return values
intgetByChatForEachUsers()
public
getByChatForEachUsers(int $chatId, array<string|int, mixed> $userIds) : array<string|int, mixed>
Parameters
- $chatId : int
- $userIds : array<string|int, mixed>
Return values
array<string|int, mixed>getChildrenWithCounters()
public
static getChildrenWithCounters(Chat $parentChat[, int|null $userId = null ]) : array<string|int, mixed>
Parameters
- $parentChat : Chat
- $userId : int|null = null
Return values
array<string|int, mixed>getContext()
Returns the local or global context for the action.
public
getContext() : Context
Return values
ContextgetForEachChat()
public
getForEachChat([array<string|int, mixed>|null $chatIds = null ]) : array<string|int, mixed>
Parameters
- $chatIds : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>getForNotifyChat()
public
getForNotifyChat() : int
Return values
intgetForNotifyChats()
public
getForNotifyChats(array<string|int, mixed> $chatIds) : array<string|int, mixed>
Parameters
- $chatIds : array<string|int, mixed>
Return values
array<string|int, mixed>getIdFirstUnreadMessage()
public
getIdFirstUnreadMessage(int $chatId) : int|null
Parameters
- $chatId : int
Return values
int|nullgetIdFirstUnreadMessageForEachChats()
public
getIdFirstUnreadMessageForEachChats(array<string|int, mixed> $chatIds) : array<string|int, mixed>
Parameters
- $chatIds : array<string|int, mixed>
Return values
array<string|int, mixed>getTotal()
public
getTotal() : int
Return values
intonAfterUserUpdate()
public
static onAfterUserUpdate(array<string|int, mixed> $fields) : void
Parameters
- $fields : array<string|int, mixed>
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
selfupdateIsMuted()
public
updateIsMuted(int $chatId, string $isMuted) : void
Parameters
- $chatId : int
- $isMuted : string
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