PHP Class PAMI\Message\Message

Afficher le fichier Open project: marcelog/pami

Protected Properties

Свойство Type Description
$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).

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
serializeVariable ( string $key, string $value ) : string Returns the string representation for an ami action variable.

Method Details

__construct() public méthode

Constructor.
public __construct ( ) : void
Résultat void

__sleep() public méthode

Serialize function.
public __sleep ( ) : string[]
Résultat string[]

finishMessage() protected méthode

Returns the end of message token appended to the end of a given message.
protected finishMessage ( $message ) : string
Résultat string

getActionID() public méthode

Returns key: 'ActionID'.
public getActionID ( ) : string
Résultat string

getCreatedDate() public méthode

Returns created date.
public getCreatedDate ( ) : integer
Résultat integer

getKey() public méthode

Returns a key by name.
public getKey ( string $key ) : string
$key string Key name (i.e: Action).
Résultat string

getKeys() public méthode

Returns all keys for this message.
public getKeys ( ) : string[]
Résultat string[]

getVariable() public méthode

Returns a variable by name.
public getVariable ( string $key ) : string
$key string Variable name.
Résultat string

getVariables() public méthode

Returns all variabels for this message.
public getVariables ( ) : string[]
Résultat string[]

serialize() public méthode

Gives a string representation for this message, ready to be sent to ami.
public serialize ( ) : string
Résultat string

setKey() protected méthode

Adds a variable to this message.
protected setKey ( string $key, string $value ) : void
$key string Key name (i.e: Action).
$value string Key value.
Résultat void

setVariable() public méthode

Adds a variable to this message.
public setVariable ( string $key, string $value ) : void
$key string Variable name.
$value string Variable value.
Résultat void

Property Details

$createdDate protected_oe property

Created date (unix timestamp).
protected int $createdDate
Résultat integer

$keys protected_oe property

Metadata. Message "keys" i.e: Action: login
protected string[] $keys
Résultat string[]

$lines protected_oe property

Message content, line by line. This is what it gets sent or received literally.
protected string[] $lines
Résultat string[]

$variables protected_oe property

Metadata. Message variables (key/value).
protected string[] $variables
Résultat string[]