Provider
extends Base
in package
Basic class to sms provider.
Table of Contents
- $name : string
- Provider name | File name.
- $url : string
- Address URL.
- $value : array<string|int, mixed>
- __construct() : mixed
- Constructor.
- get() : mixed
- Function to get the value for a given key.
- getArray() : array<string|int, mixed>
- Function to get the array values for a given key.
- getAuthorization() : string
- Authorization.
- getData() : array<string|int, mixed>
- Function to get all the values of the Object.
- getEditFields() : array<string|int, Vtiger_Field_Model>
- Fields for edit view in settings.
- getEditViewUrl() : string
- Function to get Edit view url.
- getForHtml() : mixed
- Function to get the html encoded value for a given key.
- getForSql() : mixed
- Function to get the value if its safe to use for SQL Query (column).
- getHeaders() : array<string|int, string>
- Headers.
- getKeys() : array<string|int, string>
- Function to get keys.
- getName() : string
- Function to get provider name.
- getRequiredParams() : array<string|int, string>
- Required fields.
- has() : bool
- Function to check if the key exists.
- isEmpty() : bool
- Function to check if the key is empty.
- remove() : mixed
- Function to remove the value.
- send() : bool
- Function to handle SMS Send operation.
- sendByRecord() : bool
- Send by record.
- set() : $this
- Function to set the value for a given key.
- setData() : $this
- Function to set all the values.
- setPhone() : $this
- Set phone number.
Properties
$name
Provider name | File name.
protected
string
$name
$url
Address URL.
protected
string
$url
$value
protected
array<string|int, mixed>
$value
Values
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $values = [] ]) : mixed
Parameters
- $values : array<string|int, mixed> = []
Return values
mixed —get()
Function to get the value for a given key.
public
get(string $key) : mixed
Parameters
- $key : string
Return values
mixed —Value for the given key
getArray()
Function to get the array values for a given key.
public
getArray(string $key[, array<string|int, mixed> $value = [] ]) : array<string|int, mixed>
Parameters
- $key : string
- $value : array<string|int, mixed> = []
Return values
array<string|int, mixed> —getAuthorization()
Authorization.
public
getAuthorization() : string
Return values
string —getData()
Function to get all the values of the Object.
public
getData() : array<string|int, mixed>
Return values
array<string|int, mixed> —getEditFields()
Fields for edit view in settings.
public
abstract getEditFields() : array<string|int, Vtiger_Field_Model>
Return values
array<string|int, Vtiger_Field_Model> —getEditViewUrl()
Function to get Edit view url.
public
getEditViewUrl() : string
Return values
string —Url
getForHtml()
Function to get the html encoded value for a given key.
public
getForHtml(string $key) : mixed
Parameters
- $key : string
Return values
mixed —getForSql()
Function to get the value if its safe to use for SQL Query (column).
public
getForSql(string $key[, bool $skipEmtpy = true ]) : mixed
Parameters
- $key : string
- $skipEmtpy : bool = true
-
Skip the check if string is empty
Return values
mixed —Value for the given key
getHeaders()
Headers.
public
getHeaders() : array<string|int, string>
Return values
array<string|int, string> —getKeys()
Function to get keys.
public
getKeys() : array<string|int, string>
Return values
array<string|int, string> —getName()
Function to get provider name.
public
getName() : string
Return values
string —provider name
getRequiredParams()
Required fields.
public
getRequiredParams() : array<string|int, string>
Return values
array<string|int, string> —has()
Function to check if the key exists.
public
has(string $key) : bool
Parameters
- $key : string
Return values
bool —isEmpty()
Function to check if the key is empty.
public
isEmpty(string $key) : bool
Parameters
- $key : string
Return values
bool —remove()
Function to remove the value.
public
remove(string $key) : mixed
Parameters
- $key : string
Return values
mixed —send()
Function to handle SMS Send operation.
public
abstract send() : bool
Return values
bool —sendByRecord()
Send by record.
public
abstract sendByRecord(Vtiger_Record_Model $recordModel) : bool
Parameters
- $recordModel : Vtiger_Record_Model
Return values
bool —set()
Function to set the value for a given key.
public
set(string $key, mixed $value) : $this
Parameters
- $key : string
- $value : mixed
Return values
$this —setData()
Function to set all the values.
public
setData(mixed $values) : $this
Parameters
- $values : mixed
Return values
$this —setPhone()
Set phone number.
public
setPhone(string $phoneNumber) : $this
Parameters
- $phoneNumber : string