VuFind API Documentation

Mailer extends AbstractBase
in package

VuFind Mailer Class for SMS messages

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

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

link

Wiki

Table of Contents

$carriers  : array<string|int, mixed>
Default carriers, usually overridden by contents of web/conf/sms.ini.
$defaultFrom  : string
Default "from" address
$mailer  : Mailer
VuFind Mailer object
$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

Properties

$carriers

Default carriers, usually overridden by contents of web/conf/sms.ini.

protected array<string|int, mixed> $carriers = ['virgin' => ['name' => 'Virgin Mobile', 'domain' => 'vmobl.com'], 'att' => ['name' => 'AT&T', 'domain' => 'mms.att.net'], 'verizon' => ['name' => 'Verizon', 'domain' => 'vtext.com'], 'nextel' => ['name' => 'Nextel', 'domain' => 'messaging.nextel.com'], 'sprint' => ['name' => 'Sprint', 'domain' => 'messaging.sprintpcs.com'], 'tmobile' => ['name' => 'T Mobile', 'domain' => 'tmomail.net'], 'alltel' => ['name' => 'Alltel', 'domain' => 'message.alltel.com'], 'Cricket' => ['name' => 'Cricket', 'domain' => 'mms.mycricket.com']]

$defaultFrom

Default "from" address

protected string $defaultFrom

$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: defaultFrom (optional) and mailer (must be a \VuFind\Mailer\Mailer 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
SMS
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

Search results