\Notifier_Engine_GamaSmsIr

Defines a general notifier engine. Different notifier engines should impelement this class.

Summary

Methods
Properties
Constants
getType()
getSymbol()
getTitle()
getDescription()
send()
jsonSerialize()
getParameters()
getGeneralParam()
getExtraParam()
No public properties found
ENGINE_PREFIX
ENGINE_PARAMETER_USERNAME
ENGINE_PARAMETER_PASSWORD
ENGINE_PARAMETER_FROM
ENGINE_PARAMETER_TEMPLATE
No protected methods found
No protected properties found
N/A
sendSms()
initParameters()
No private properties found
N/A

Constants

ENGINE_PREFIX

ENGINE_PREFIX = 'notifier_engine_'

ENGINE_PARAMETER_USERNAME

ENGINE_PARAMETER_USERNAME = 'notifier.engine.GamaSmsIr.username'

ENGINE_PARAMETER_PASSWORD

ENGINE_PARAMETER_PASSWORD = 'notifier.engine.GamaSmsIr.password'

ENGINE_PARAMETER_FROM

ENGINE_PARAMETER_FROM = 'notifier.engine.GamaSmsIr.from'

ENGINE_PARAMETER_TEMPLATE

ENGINE_PARAMETER_TEMPLATE = 'notifier.engine.GamaSmsIr.template' : string

The string [code] in the template will be replaced with the notification code.

Methods

getType()

getType() : string

Returns

string

getSymbol()

getSymbol() : string

Returns

string

getTitle()

getTitle() : string

Returns

string

getDescription()

getDescription() : string

Returns

string

send()

send(array  $data) : boolean

Sends notification to its related account.

This function should be overrided by implementors.

Parameters

array $data

Returns

boolean —

true if sending notification is successful else false.

jsonSerialize()

jsonSerialize() 

(non-PHPdoc)

getParameters()

getParameters() 

Returns an array of parameters of the notifier engine

Each notifier engine needs some parameters which should be provided by the creator. This function returns these parameters as an array.

The returned value of this function is a list of property descriptors.

getGeneralParam()

getGeneralParam() : 

Returns a list of the general parameters.

Returns

getExtraParam()

getExtraParam() : array

Returns a list of the extra parameters.

This functions should be overrided by implementors which have some other parameters other than general parameters.

Returns

array

sendSms()

sendSms(  $data) 

Parameters

$data

initParameters()

initParameters(  $data) : array

Provides and returns needed parameters to send SMS.

Parameters

$data

Returns

array