PHP Класс Prowl\Message

This class represents a single message to be send by the connector.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
addApiKey ( string $sKey ) : Message Sets the api key.
getApiKeysAsArray ( ) : array[string] Returns all actual api keys as array.
getApiKeysAsString ( ) : string Returns all actual api keys as string
getApplication ( ) : string Returns the application string.
getDescription ( ) : string Returns the description.
getEvent ( ) : string Returns the event.
getFilter ( ) : Prowl\Security\Secureable Returns the filter instance, if set. It might return null when no filter is set.
getFilterCallback ( ) : Closure Getter for the filter closure.
getPriority ( ) : integer Returns the priority as signed integer
getUrl ( ) : string Returns the Url that should be sent with the message
removeApiKey ( string $sKey ) : Message Removes an api key from the receiver list.
setApplication ( string $sApp ) : Message Sets the application.
setDescription ( string $sDescription ) : Message Sets the event description.
setEvent ( string $sEvent ) : Message Sets the event.
setFilter ( Prowl\Security\Secureable $oFilterInstance ) : Message Set a filter instance. If you do not need a filter, use the Passthrough filter.
setFilterCallback ( Closure $cCallback ) : void An alternative way to filter. You can set a closure instead of a filter instance. If both are set, the closure will be preferred.
setPriority ( integer $iPriority ) : Message Sets the proirity (-2 to 2) This method uses a fluent interface.
setUrl ( string $sUrl ) : void Sets an Url to be sent with the message.
validate ( ) : boolean Validates the basic needs of the prowl api.

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

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

This method uses a fluent interface.
public addApiKey ( string $sKey ) : Message
$sKey string An valid api key.
Результат Message

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

Returns all actual api keys as array.
public getApiKeysAsArray ( ) : array[string]
Результат array[string]

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

Returns all actual api keys as string
public getApiKeysAsString ( ) : string
Результат string

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

Returns the application string.
public getApplication ( ) : string
Результат string

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

Returns the description.
public getDescription ( ) : string
Результат string

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

Returns the event.
public getEvent ( ) : string
Результат string

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

Returns the filter instance, if set. It might return null when no filter is set.
public getFilter ( ) : Prowl\Security\Secureable
Результат Prowl\Security\Secureable

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

Getter for the filter closure.
public getFilterCallback ( ) : Closure
Результат Closure

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

Returns the priority as signed integer
public getPriority ( ) : integer
Результат integer

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

Returns the Url that should be sent with the message
public getUrl ( ) : string
Результат string

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

Removes an api key from the receiver list.
public removeApiKey ( string $sKey ) : Message
$sKey string
Результат Message

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

Sets the application.
public setApplication ( string $sApp ) : Message
$sApp string The name of the sending application.
Результат Message

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

Sets the event description.
public setDescription ( string $sDescription ) : Message
$sDescription string The event description.
Результат Message

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

Sets the event.
public setEvent ( string $sEvent ) : Message
$sEvent string The event.
Результат Message

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

Set a filter instance. If you do not need a filter, use the Passthrough filter.
public setFilter ( Prowl\Security\Secureable $oFilterInstance ) : Message
$oFilterInstance Prowl\Security\Secureable
Результат Message

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

An alternative way to filter. You can set a closure instead of a filter instance. If both are set, the closure will be preferred.
public setFilterCallback ( Closure $cCallback ) : void
$cCallback Closure
Результат void

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

Sets the proirity (-2 to 2) This method uses a fluent interface.
public setPriority ( integer $iPriority ) : Message
$iPriority integer An signed integer from -2 to 2
Результат Message

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

Sets an Url to be sent with the message.
public setUrl ( string $sUrl ) : void
$sUrl string
Результат void

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

Validates the basic needs of the prowl api.
public validate ( ) : boolean
Результат boolean