You are here

function sms_gateways in SMS Framework 6.2

Same name and namespace in other branches
  1. 5 sms.module \sms_gateways()
  2. 6 sms.module \sms_gateways()
  3. 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.

4 calls to sms_gateways()
sms_admin_default_form in ./sms.admin.inc
Select default sms gateway form.
sms_admin_gateway_form in ./sms.admin.inc
Form builder for the sms gateway configuration form.
sms_admin_gateway_title in ./sms.module
SMS gateway menutitle callback.
sms_default_gateway in ./sms.module
Returns the current default gateway.

File

./sms.module, line 313
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];
  }
}