SMSProvider
extends Base
in package
SMS Provider class.
Table of Contents
- STATUS_ACTIVE = 1
- STATUS_INACTIVE = 0
- TABLE_NAME = 'a_#__smsnotifier_servers'
- $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.
- getById() : Provider|null
- Get provider by ID.
- getData() : array<string|int, mixed>
- Function to get all the values of the Object.
- getDefaultProvider() : Provider|null
- Get default provider.
- 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).
- getKeys() : array<string|int, string>
- Function to get keys.
- getProviderByData() : Provider|null
- Get provider by data.
- getProviderByName() : Provider|null
- Get provider by name.
- getProviders() : array<string|int, mixed>
- Get providers.
- has() : bool
- Function to check if the key exists.
- isActiveProvider() : bool
- Check if there is an active provider.
- isEmpty() : bool
- Function to check if the key is empty.
- remove() : mixed
- Function to remove the value.
- set() : $this
- Function to set the value for a given key.
- setData() : $this
- Function to set all the values.
Constants
STATUS_ACTIVE
public
int
STATUS_ACTIVE
= 1
Status active
STATUS_INACTIVE
public
int
STATUS_INACTIVE
= 0
Status inactive
TABLE_NAME
public
string
TABLE_NAME
= 'a_#__smsnotifier_servers'
Basic table name
Properties
$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> —getById()
Get provider by ID.
public
static getById(int $id) : Provider|null
Parameters
- $id : int
Return values
Provider|null —getData()
Function to get all the values of the Object.
public
getData() : array<string|int, mixed>
Return values
array<string|int, mixed> —getDefaultProvider()
Get default provider.
public
static getDefaultProvider() : Provider|null
Return values
Provider|null —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
getKeys()
Function to get keys.
public
getKeys() : array<string|int, string>
Return values
array<string|int, string> —getProviderByData()
Get provider by data.
public
static getProviderByData(array<string|int, mixed> $data) : Provider|null
Parameters
- $data : array<string|int, mixed>
Return values
Provider|null —getProviderByName()
Get provider by name.
public
static getProviderByName(string $name) : Provider|null
Parameters
- $name : string
Return values
Provider|null —getProviders()
Get providers.
public
static getProviders() : array<string|int, mixed>
Return values
array<string|int, mixed> —has()
Function to check if the key exists.
public
has(string $key) : bool
Parameters
- $key : string
Return values
bool —isActiveProvider()
Check if there is an active provider.
public
static isActiveProvider() : bool
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 —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