inc\classes\Contacts.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
File with Contacts logic

No additional classes/funtions

Author
Sergey Dilong  
License
GPL-2.0  
Package
Temply-Account\Services  

\Contacts

Package: Temply-Account\Services
Contacts class

Get list of contacts who you can add to chats etc.

Author
Sergey Dilong  
License
GPL-2.0  

Methods

methodpublicAdd(integer $u, string | integer $q = "me", array $o = array()) : boolean
static

Add User to Contacts

Adds a user to requested contacts list

Parameters
NameTypeDescription
$uinteger

User ID to add

$qstring | integer

Contacts list owner. If === me - works with current user

$oarray

Options

Returns
TypeDescription
boolean
Throws
ExceptionDescription
\apiException* [701] Incorrect ID * [702] User is already added
Details
Api
 
methodpublicFindByID(integer $u, integer | string $q = "me", array $o = array()) : boolean
static

Find By ID

Search for a user in contacts list

Returns true if found such ID

Parameters
NameTypeDescription
$uinteger

Requested user

$qinteger | string

Contacts ist owner. If === me - works with current user

$oarray

Options

Returns
TypeDescription
boolean
Details
Api
 
methodpublicGet(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

Parameters
NameTypeDescription
$qinteger | string

Query. If === me - works with current user

$oarray

Options

  • RETURN_IDS - Users will be returned as int ids instead of classes
$u_oarray

Options for User class

Returns
TypeDescription
\(User | array<mixed,\int)>
Throws
ExceptionDescription
\apiException* [701] Incorrect query
Details
Api
 
methodpublicRemove(integer $u, string | integer $q = "me") : boolean
static

Remove Contacts

Removes a contact from list

Not ready yet

Parameters
NameTypeDescription
$uinteger

User to remove

$qstring | integer

Contacts ist owner. If === me - work with current user

Returns
TypeDescription
booleanResult
Throws
ExceptionDescription
\apiException* [701] Incorrect typ * [703] No such user in contacts
Details
Api
 
Documentation was generated by phpDocumentor v2.9.0.