Documentation

CRM_SMS_Provider
in package

AbstractYes
Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Constants

MAX_SMS_CHAR  = 460

Properties

$_singleton  : object
We only need one instance of this object. So we use the singleton pattern and cache the instance in this variable

Methods

createActivity()  : self|null|object
formatPhone()  : mixed|string
processInbound()  : self|null|object
retrieve()  : mixed
send()  : mixed
Send an SMS Message via the API Server.
singleton()  : object
Singleton function used to manage this object.
stripPhone()  : mixed|string
urlEncode()  : string
formatPhoneNumber()  : string
Format phone number with % - this may no longer make sense as we now compare with phone_numeric.

Constants

MAX_SMS_CHAR

public mixed MAX_SMS_CHAR = 460

Properties

$_singleton

We only need one instance of this object. So we use the singleton pattern and cache the instance in this variable

private static object $_singleton = []

Methods

createActivity()

public createActivity(int $apiMsgID, mixed $message[, array<string|int, mixed> $headers = [] ][, int $jobID = NULL ][, int $userID = NULL ]) : self|null|object
Parameters
$apiMsgID : int
$message : mixed
$headers : array<string|int, mixed> = []
$jobID : int = NULL
$userID : int = NULL
Tags
throws
CRM_Core_Exception
Return values
self|null|object

formatPhone()

public formatPhone(mixed $phone, mixed &$kind[, string $format = "dash" ]) : mixed|string

since 5.73 will be removed around 5.95

Parameters
$phone : mixed
$kind : mixed
$format : string = "dash"
Return values
mixed|string

processInbound()

public processInbound(mixed $from, mixed $body[, null $to = NULL ][, int $trackID = NULL ]) : self|null|object
Parameters
$from : mixed
$body : mixed
$to : null = NULL
$trackID : int = NULL
Tags
throws
CRM_Core_Exception
Return values
self|null|object

retrieve()

public retrieve(string $name, mixed $type[, bool $abort = TRUE ][, null $default = NULL ][, string $location = 'REQUEST' ]) : mixed
Parameters
$name : string
$type : mixed
$abort : bool = TRUE
$default : null = NULL
$location : string = 'REQUEST'

send()

Send an SMS Message via the API Server.

public abstract send(array<string|int, mixed> $recipients, string $header, string $message[, int $dncID = NULL ]) : mixed
Parameters
$recipients : array<string|int, mixed>
$header : string
$message : string
$dncID : int = NULL

singleton()

Singleton function used to manage this object.

public static & singleton([array<string|int, mixed> $providerParams = [] ][, bool $force = FALSE ]) : object
Parameters
$providerParams : array<string|int, mixed> = []
$force : bool = FALSE
Tags
throws
CRM_Core_Exception
Return values
object

stripPhone()

public stripPhone(mixed $phone) : mixed|string
Parameters
$phone : mixed
Return values
mixed|string

urlEncode()

public urlEncode(mixed $values) : string
Parameters
$values : mixed
Return values
string

formatPhoneNumber()

Format phone number with % - this may no longer make sense as we now compare with phone_numeric.

private formatPhoneNumber(string $phone) : string
Parameters
$phone : string
Return values
string

        
On this page

Search results