PHP Класс PAMI\Message\Message

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$createdDate integer Created date (unix timestamp).
$keys string[] Metadata. Message "keys" i.e: Action: login
$lines string[] Message content, line by line. This is what it gets sent or received literally.
$variables string[] Metadata. Message variables (key/value).

Открытые методы

Метод Описание
__construct ( ) : void Constructor.
__sleep ( ) : string[] Serialize function.
getActionID ( ) : string Returns key: 'ActionID'.
getCreatedDate ( ) : integer Returns created date.
getKey ( string $key ) : string Returns a key by name.
getKeys ( ) : string[] Returns all keys for this message.
getVariable ( string $key ) : string Returns a variable by name.
getVariables ( ) : string[] Returns all variabels for this message.
serialize ( ) : string Gives a string representation for this message, ready to be sent to ami.
setVariable ( string $key, string $value ) : void Adds a variable to this message.

Защищенные методы

Метод Описание
finishMessage ( $message ) : string Returns the end of message token appended to the end of a given message.
setKey ( string $key, string $value ) : void Adds a variable to this message.

Приватные методы

Метод Описание
serializeVariable ( string $key, string $value ) : string Returns the string representation for an ami action variable.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( ) : void
Результат void

__sleep() публичный Метод

Serialize function.
public __sleep ( ) : string[]
Результат string[]

finishMessage() защищенный Метод

Returns the end of message token appended to the end of a given message.
protected finishMessage ( $message ) : string
Результат string

getActionID() публичный Метод

Returns key: 'ActionID'.
public getActionID ( ) : string
Результат string

getCreatedDate() публичный Метод

Returns created date.
public getCreatedDate ( ) : integer
Результат integer

getKey() публичный Метод

Returns a key by name.
public getKey ( string $key ) : string
$key string Key name (i.e: Action).
Результат string

getKeys() публичный Метод

Returns all keys for this message.
public getKeys ( ) : string[]
Результат string[]

getVariable() публичный Метод

Returns a variable by name.
public getVariable ( string $key ) : string
$key string Variable name.
Результат string

getVariables() публичный Метод

Returns all variabels for this message.
public getVariables ( ) : string[]
Результат string[]

serialize() публичный Метод

Gives a string representation for this message, ready to be sent to ami.
public serialize ( ) : string
Результат string

setKey() защищенный Метод

Adds a variable to this message.
protected setKey ( string $key, string $value ) : void
$key string Key name (i.e: Action).
$value string Key value.
Результат void

setVariable() публичный Метод

Adds a variable to this message.
public setVariable ( string $key, string $value ) : void
$key string Variable name.
$value string Variable value.
Результат void

Описание свойств

$createdDate защищенное свойство

Created date (unix timestamp).
protected int $createdDate
Результат integer

$keys защищенное свойство

Metadata. Message "keys" i.e: Action: login
protected string[] $keys
Результат string[]

$lines защищенное свойство

Message content, line by line. This is what it gets sent or received literally.
protected string[] $lines
Результат string[]

$variables защищенное свойство

Metadata. Message variables (key/value).
protected string[] $variables
Результат string[]