inc\classes\Contacts.php
File with Contacts logic
No additional classes/funtions
- Author
- Sergey Dilong
- License
- GPL-2.0
- Package
- Temply-Account\Services
\Contacts
Package: Temply-Account\Services
Parameters
Returns
Throws
Details
Parameters
Returns
Details
Parameters
Returns
Throws
Details
Parameters
Returns
Throws
Details
Contacts class
Get list of contacts who you can add to chats etc.
- Author
- Sergey Dilong
- License
- GPL-2.0
Methods

Add(integer $u, string | integer $q = "me", array $o = array()) : booleanstatic
Add User to Contacts
Adds a user to requested contacts list
| Name | Type | Description |
|---|---|---|
| $u | integer | User ID to add |
| $q | string | integer | Contacts list owner. If === |
| $o | array | Options |
| Type | Description |
|---|---|
| boolean |
| Exception | Description |
|---|---|
| \apiException | * [701] Incorrect ID * [702] User is already added |
- Api

FindByID(integer $u, integer | string $q = "me", array $o = array()) : booleanstatic
Find By ID
Search for a user in contacts list
Returns true if found such ID
| Name | Type | Description |
|---|---|---|
| $u | integer | Requested user |
| $q | integer | string | Contacts ist owner. If === |
| $o | array | Options |
| Type | Description |
|---|---|
| boolean |
- Api

Get(integer | string $q = "me", array $o = array(), array $u_o = array()) : \(User | array<mixed,\int)>static
Get contacts
Get current user's (or by id) contacts
| Name | Type | Description |
|---|---|---|
| $q | integer | string | Query. If === |
| $o | array | Options
|
| $u_o | array | Options for User class |
| Type | Description |
|---|---|
| \(User | array<mixed,\int)> |
| Exception | Description |
|---|---|
| \apiException | * [701] Incorrect query |
- Api

Remove(integer $u, string | integer $q = "me") : booleanstatic
Remove Contacts
Removes a contact from list
Not ready yet
| Name | Type | Description |
|---|---|---|
| $u | integer | User to remove |
| $q | string | integer | Contacts ist owner. If === |
| Type | Description |
|---|---|
| boolean | Result |
| Exception | Description |
|---|---|
| \apiException | * [701] Incorrect typ * [703] No such user in contacts |
- Api