You are here

function sms_dir in SMS Framework 7

Same name and namespace in other branches
  1. 6.2 sms.module \sms_dir()
  2. 6 sms.module \sms_dir()

Returns a direction code

Direction codes are one of the SMS_DIR_* constants defined in this module.

Parameters

bool $out: Outgoing allowed or not

bool $in: Incoming allowed or not

Return value

int The constant that defines this direction combination.

3 calls to sms_dir()
SmsValidWebTest::testCrudSmsValidRulesets in modules/sms_valid/sms_valid.test
Tests the creation, update and deletion of sms_valid rulesets.
sms_valid_admin_rulesets_form_submit in modules/sms_valid/sms_valid.admin.inc
Submit handler for sms_valid_admin_rulesets_form().
sms_valid_admin_ruleset_form_submit in modules/sms_valid/sms_valid.admin.inc
Submit handler for the sms_valid_admin_ruleset_form().

File

./sms.module, line 748
The core of the SMS Framework. Provides gateway management and API for sending and receiving SMS messages.

Code

function sms_dir($out, $in) {
  if ($out && $in) {
    return SMS_DIR_ALL;
  }
  if ($out && !$in) {
    return SMS_DIR_OUT;
  }
  if (!$out && $in) {
    return SMS_DIR_IN;
  }
  if (!$out && !$in) {
    return SMS_DIR_NONE;
  }
  return SMS_DIR_NONE;
}