VuFind API Documentation

Clickatell extends AbstractBase
in package

Class for text messaging via Clickatell's HTTP API

Tags
category

VuFind

author

Ronan McHugh vufind-tech@lists.sourceforge.net

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

$client  : Client
HTTP client
$smsConfig  : Config
SMS configuration
__construct()  : mixed
Constructor
getCarriers()  : array<string|int, mixed>
Get a list of carriers supported by the module. Returned as an array of associative arrays indexed by carrier ID and containing "name" and "domain" keys.
getValidationType()  : string
Get validation type for phone numbers
text()  : void
Send a text message to the specified provider.
filterPhoneNumber()  : string
Filter bad characters from a phone number
formatMessage()  : string
Format message for texting.
getApiId()  : string
Get API ID.
getApiPassword()  : string
Get API password.
getApiUrl()  : string
Get API URL.
getApiUsername()  : string
Get API username.

Properties

$smsConfig

SMS configuration

protected Config $smsConfig

Methods

__construct()

Constructor

public __construct(Config $config[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$config : Config

SMS configuration

$options : array<string|int, mixed> = []

Additional options (client may be an HTTP client object)

Return values
mixed

getCarriers()

Get a list of carriers supported by the module. Returned as an array of associative arrays indexed by carrier ID and containing "name" and "domain" keys.

public getCarriers() : array<string|int, mixed>
Return values
array<string|int, mixed>

getValidationType()

Get validation type for phone numbers

public getValidationType() : string
Return values
string

text()

Send a text message to the specified provider.

public text(string $provider, string $to, string $from, string $message) : void
Parameters
$provider : string

The provider ID to send to

$to : string

The phone number at the provider

$from : string

The email address to use as sender

$message : string

The message to send

Tags
throws
Mail
Return values
void

filterPhoneNumber()

Filter bad characters from a phone number

protected filterPhoneNumber(string $num) : string
Parameters
$num : string

Phone number to filter

Return values
string

formatMessage()

Format message for texting.

protected formatMessage(string $message) : string
Parameters
$message : string

Message to format

Return values
string

getApiId()

Get API ID.

protected getApiId() : string
Return values
string

getApiPassword()

Get API password.

protected getApiPassword() : string
Return values
string

getApiUrl()

Get API URL.

protected getApiUrl(string $to, string $message) : string
Parameters
$to : string

The phone number at the provider

$message : string

The message to send

Return values
string

getApiUsername()

Get API username.

protected getApiUsername() : string
Return values
string

Search results