function sms_gateways in SMS Framework 5
Same name and namespace in other branches
- 6.2 sms.module \sms_gateways()
- 6 sms.module \sms_gateways()
- 7 sms.module \sms_gateways()
Get a list of all gateways
Parameters
$op: The format in which to return the list. When set to 'gateway' or 'name', only the specified gateway is returned. When set to 'gateways' or 'names', all gateways are returned.
$gateway: A gateway identifier string that indicates the gateway to return. Leave at default value (NULL) to return all gateways.
Return value
Either an array of all gateways or a single gateway, in a variable format.
7 calls to sms_gateways()
- sms_admin_default_form in ./
sms.module - Form for selecting the default gateway.
- sms_admin_gateway_form in ./
sms.module - Gateway configuration form. Loads form from gateway.
- sms_clickatell_command in modules/
sms_clickatell/ sms_clickatell.module - Executes a command using the Clickatell API
- sms_default_gateway in ./
sms.module - Returns the current default gateway.
- sms_muse_command in modules/
sms_muse/ sms_muse.module
File
- ./
sms.module, line 233 - The core of the SMS Framework. Provides gateway managment and API for sending and receiving SMS messages.
Code
function sms_gateways($op = 'gateways', $gateway = NULL) {
list($_gateways, $_names) = _gateways_build();
switch ($op) {
case 'gateways':
return $_gateways;
case 'gateway':
$return = $_gateways[$gateway];
$return['identifier'] = $gateway;
return $return;
case 'names':
return $_names;
case 'name':
return $_names[$gateway];
}
}