IManager
in
This interface allows to manage the user status.
This interface must not be implemented in your application but instead should be used as a service and injected in your code with dependency injection.
Tags
Table of Contents
- getUserStatuses() : array<string|int, IUserStatus>
- Gets the statuses for all users in $users
- revertMultipleUserStatus() : void
- Revert an automatically set user status. For example after leaving a call, change back to the previously set status.
- revertUserStatus() : void
- Revert an automatically set user status. For example after leaving a call, change back to the previously set status.
- setUserStatus() : void
- Set a new status for the selected user.
Methods
getUserStatuses()
Gets the statuses for all users in $users
public
getUserStatuses(array<string|int, string> $userIds) : array<string|int, IUserStatus>
Parameters
- $userIds : array<string|int, string>
Tags
Return values
array<string|int, IUserStatus> —revertMultipleUserStatus()
Revert an automatically set user status. For example after leaving a call, change back to the previously set status.
public
revertMultipleUserStatus(array<string|int, string> $userIds, string $messageId, string $status) : void
Parameters
- $userIds : array<string|int, string>
-
The user for which we want to update the status.
- $messageId : string
-
The expected current messageId. If the user has already updated their status, this method does nothing.
- $status : string
-
The expected current status. If the user has already updated their status, this method does nothing.
Tags
Return values
void —revertUserStatus()
Revert an automatically set user status. For example after leaving a call, change back to the previously set status.
public
revertUserStatus(string $userId, string $messageId, string $status) : void
Parameters
- $userId : string
-
The user for which we want to update the status.
- $messageId : string
-
The expected current messageId. If the user has already updated their status, this method does nothing.
- $status : string
-
The expected current status. If the user has already updated their status, this method does nothing.
Tags
Return values
void —setUserStatus()
Set a new status for the selected user.
public
setUserStatus(string $userId, string $messageId, string $status[, bool $createBackup = false ]) : void
Parameters
- $userId : string
-
The user for which we want to update the status.
- $messageId : string
-
The id of the predefined message.
- $status : string
-
The status to assign
- $createBackup : bool = false
-
If true, this will store the old status so that it is possible to revert it later (e.g. after a call).