abstract class CRM_SMS_Provider

Constants

MAX_SMS_CHAR

Methods

static object
singleton(array $providerParams = array(), bool $force = FALSE)

Singleton function used to manage this object.

send(array $recipients, string $header, string $message, int $dncID = NULL)

Send an SMS Message via the API Server.

string
getMessage(string $message, int $contactID, array $contactDetails)

Return message text.

mixed
getRecipientDetails(array $fields, array $additionalDetails)

Get recipient details.

CRM_SMS_Provider|null|object
createActivity(int $apiMsgID, $message, array $headers = array(), int $jobID = NULL, int $userID = NULL)

No description

mixed
retrieve(string $name, $type, bool $abort = TRUE, null $default = NULL, string $location = 'REQUEST')

No description

CRM_SMS_Provider|null|object
processInbound($from, $body, null $to = NULL, int $trackID = NULL)

No description

mixed|string
stripPhone($phone)

No description

mixed|string
formatPhone($phone, $kind, string $format = "dash")

No description

string
urlEncode($values)

No description

Details

at line 52
static object singleton(array $providerParams = array(), bool $force = FALSE)

Singleton function used to manage this object.

Parameters

array $providerParams
bool $force

Return Value

object

at line 99
abstract send(array $recipients, string $header, string $message, int $dncID = NULL)

Send an SMS Message via the API Server.

Parameters

array $recipients
string $header
string $message
int $dncID

at line 112
string getMessage(string $message, int $contactID, array $contactDetails)

Return message text.

Child class could override this function to have better control over the message being sent.

Parameters

string $message
int $contactID
array $contactDetails

Return Value

string

at line 127
mixed getRecipientDetails(array $fields, array $additionalDetails)

Get recipient details.

Parameters

array $fields
array $additionalDetails

Return Value

mixed

at line 143
CRM_SMS_Provider|null|object createActivity(int $apiMsgID, $message, array $headers = array(), int $jobID = NULL, int $userID = NULL)

Parameters

int $apiMsgID
$message
array $headers
int $jobID
int $userID

Return Value

CRM_SMS_Provider|null|object

Exceptions

CRM_Core_Exception

at line 186
mixed retrieve(string $name, $type, bool $abort = TRUE, null $default = NULL, string $location = 'REQUEST')

Parameters

string $name
$type
bool $abort
null $default
string $location

Return Value

mixed

at line 208
CRM_SMS_Provider|null|object processInbound($from, $body, null $to = NULL, int $trackID = NULL)

Parameters

$from
$body
null $to
int $trackID

Return Value

CRM_SMS_Provider|null|object

Exceptions

CRM_Core_Exception

at line 292
mixed|string stripPhone($phone)

Parameters

$phone

Return Value

mixed|string

at line 313
mixed|string formatPhone($phone, $kind, string $format = "dash")

Parameters

$phone
$kind
string $format

Return Value

mixed|string

at line 375
string urlEncode($values)

Parameters

$values

Return Value

string