PHP Class Prowl\Message

This class represents a single message to be send by the connector.
Afficher le fichier Open project: xenji/prowlphp Class Usage Examples

Méthodes publiques

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

Method Details

addApiKey() public méthode

This method uses a fluent interface.
public addApiKey ( string $sKey ) : Message
$sKey string An valid api key.
Résultat Message

getApiKeysAsArray() public méthode

Returns all actual api keys as array.
public getApiKeysAsArray ( ) : array[string]
Résultat array[string]

getApiKeysAsString() public méthode

Returns all actual api keys as string
public getApiKeysAsString ( ) : string
Résultat string

getApplication() public méthode

Returns the application string.
public getApplication ( ) : string
Résultat string

getDescription() public méthode

Returns the description.
public getDescription ( ) : string
Résultat string

getEvent() public méthode

Returns the event.
public getEvent ( ) : string
Résultat string

getFilter() public méthode

Returns the filter instance, if set. It might return null when no filter is set.
public getFilter ( ) : Prowl\Security\Secureable
Résultat Prowl\Security\Secureable

getFilterCallback() public méthode

Getter for the filter closure.
public getFilterCallback ( ) : Closure
Résultat Closure

getPriority() public méthode

Returns the priority as signed integer
public getPriority ( ) : integer
Résultat integer

getUrl() public méthode

Returns the Url that should be sent with the message
public getUrl ( ) : string
Résultat string

removeApiKey() public méthode

Removes an api key from the receiver list.
public removeApiKey ( string $sKey ) : Message
$sKey string
Résultat Message

setApplication() public méthode

Sets the application.
public setApplication ( string $sApp ) : Message
$sApp string The name of the sending application.
Résultat Message

setDescription() public méthode

Sets the event description.
public setDescription ( string $sDescription ) : Message
$sDescription string The event description.
Résultat Message

setEvent() public méthode

Sets the event.
public setEvent ( string $sEvent ) : Message
$sEvent string The event.
Résultat Message

setFilter() public méthode

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
Résultat Message

setFilterCallback() public méthode

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
Résultat void

setPriority() public méthode

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
Résultat Message

setUrl() public méthode

Sets an Url to be sent with the message.
public setUrl ( string $sUrl ) : void
$sUrl string
Résultat void

validate() public méthode

Validates the basic needs of the prowl api.
public validate ( ) : boolean
Résultat boolean