Documentation

SMSAPI extends Provider
in package

SMSAPI - sms provider class.

Table of Contents

$encoding  : string
$format  : string
$mmsUrl  : string
$mmsUrlBackup  : string
$name  : string
Provider name | File name.
$url  : string
Address URL.
$urlBackup  : string
$value  : array<string|int, mixed>
$attach  : array<string|int, mixed>
$response  : Response
$responseData  : array<string|int, mixed>
__construct()  : mixed
Constructor.
addAttachment()  : $this
Add attachemnt.
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.
getCallBackUrlByService()  : string
Callback service URL.
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.
getFieldInstanceByName()  : Vtiger_Field_Model
Fields to edit in settings.
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.
getSmil()  : string
Get smil text for MMS.
getSubject()  : string
Get subject for MMS.
getUrl()  : string
Function to get service URL.
has()  : bool
Function to check if the key exists.
isEmpty()  : bool
Function to check if the key is empty.
isSuccess()  : bool
Check if the message was sent successfully.
remove()  : mixed
Function to remove the value.
send()  : bool
Function to handle SMS Send operation.
sendByRecord()  : bool
Send by record.
sendMMS()  : bool
Send MMS.
sendSMS()  : bool
Send SMS.
set()  : $this
Function to set the value for a given key.
setData()  : $this
Function to set all the values.
setMessage()  : self
Set message.
setPhone()  : $this
Set phone number.
setResponse()  : $this
Set response.
getBody()  : array<string|int, mixed>
Get body data.
getMMSBody()  : array<string|int, mixed>
Get body data for MMS.

Properties

$encoding

public string $encoding = 'utf-8'

Encoding

$format

public string $format = 'json'

Format

$mmsUrl

protected string $mmsUrl = 'https://api.smsapi.pl/mms.do'

Address URL for MMS

$mmsUrlBackup

protected string $mmsUrlBackup = 'https://api2.smsapi.pl/mms.do'

Backup address URL for MMS

$name

Provider name | File name.

protected string $name = 'SMSAPI'

$url

Address URL.

protected string $url = 'https://api.smsapi.pl/sms.do'

$urlBackup

protected string $urlBackup = 'https://api2.smsapi.pl/sms.do'

Backup address URL

$value

protected array<string|int, mixed> $value

Values

$attach

private array<string|int, mixed> $attach = []

Attachments

$response

private Response $response

Response object

$responseData

private array<string|int, mixed> $responseData

Response body

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $values = [] ]) : mixed
Parameters
$values : array<string|int, mixed> = []
Return values
mixed

addAttachment()

Add attachemnt.

public addAttachment(File $file) : $this
Parameters
$file : File
Return values
$this

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

getCallBackUrlByService()

Callback service URL.

public getCallBackUrlByService(array<string|int, mixed> $service, string $type) : string
Parameters
$service : array<string|int, mixed>
$type : string

Action name for werservice

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 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

getFieldInstanceByName()

Fields to edit in settings.

public getFieldInstanceByName(string $name) : Vtiger_Field_Model
Parameters
$name : string
Return values
Vtiger_Field_Model

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>

getSmil()

Get smil text for MMS.

public getSmil() : string
Return values
string

getSubject()

Get subject for MMS.

public getSubject() : string
Return values
string

getUrl()

Function to get service URL.

public getUrl([bool $useBackup = false ]) : string
Parameters
$useBackup : bool = false
Return values
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

isSuccess()

Check if the message was sent successfully.

public isSuccess() : bool
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 send([bool $useBackup = false ]) : bool
Parameters
$useBackup : bool = false
Return values
bool

sendMMS()

Send MMS.

public sendMMS([bool $useBackup = false ]) : bool
Parameters
$useBackup : bool = false
Return values
bool

sendSMS()

Send SMS.

public sendSMS([bool $useBackup = false ]) : bool
Parameters
$useBackup : bool = false
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

setMessage()

Set message.

public setMessage(string $message) : self
Parameters
$message : string
Return values
self

setPhone()

Set phone number.

public setPhone(string $phoneNumber) : $this
Parameters
$phoneNumber : string
Return values
$this

setResponse()

Set response.

public setResponse(Response $response) : $this
Parameters
$response : Response
Return values
$this

getBody()

Get body data.

private getBody() : array<string|int, mixed>
Return values
array<string|int, mixed>

getMMSBody()

Get body data for MMS.

private getMMSBody() : array<string|int, mixed>
Return values
array<string|int, mixed>

        

Search results