inc\classes\msgAccess.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Messages Access

Forwarding, etc.

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

\msgAccess

Package: Temply-Account\Services\Access
Get forwarded messages with msgAccess

A child of Access object for getting forwarded messages

Parent(s)
\Access
Author
Sergey Dilong  
Inherited_from
\Access  
License
GPL-2.0  

Constants

>VConstant  als = array("c" => "im_chats", "u" => "users")
Acceptable get-types
Inherited_from
\Access::als  
>VConstant  MESSAGE_TYPE = 2
Type to use it from DB and functions
>VConstant  USER_TYPE = 3
Type to use it from DB and functions
>VConstant  CHAT_TYPE = 4
Type to use it from DB and functions
>VConstant  als = array("m" => "Message", "c" => "Chat", "u" => "User")
Class names for letter-form short aliases

Properties

>VPropertyprivatearray $data = array()

Message data

Default valuearray()Details
Type
array
>VPropertyprotectedboolean $success = false

Was access provided

Default valuefalseDetails
Type
boolean

Methods

methodpublic__construct(string | array $query, array $o = array()) : void

Router

Get a message/prepare to forwarding

Parameters
NameTypeDescription
$querystring | array

Token/Message data

$oarray

Options

  • CREATE_NEW - Creates new token
Details
See
Get a message  
methodprivategetAccess(string $key, array $o = array()) : \Message

Get access to a message

access_token is used for passive access to messages (eg forwarded)

Parameters
NameTypeDescription
$keystring

32-symbols length Access key

$oarray

Options

Returns
TypeDescription
\Message
Throws
ExceptionDescription
\apiException* [400] Invalid data * [401] Not found
Details
See
Access this method outside the class  
methodpublicgetObjects(array<mixed,boolean> $o = array()) : array
inherited

Get saved in the class objects

Inherited from:

Universal method to access objects, which were stored by extended methods.

Parameters
NameTypeDescription
$oarray<mixed,boolean>

Options.

  • DOWNGRADE_CHATS_TO_USERS - Chat users lists will be extracted from Chat class and presented as User class
  • MERGE_RESULTS - If there's more than one object the return value will be merged
Returns
TypeDescription
arrayRequested objects
Details
Todo
Make separate flows for User class  
Documentation was generated by phpDocumentor v2.9.0.