You are here

function LDAPInterface::getOption in LDAP integration 6

Same name and namespace in other branches
  1. 5.2 ldap_integration/LDAPInterface.php \LDAPInterface::getOption()
  2. 5 ldap_integration/LDAPInterface.php \LDAPInterface::getOption()

File

includes/LDAPInterface.inc, line 82
LDAPInterface class definition.

Class

LDAPInterface
@file LDAPInterface class definition.

Code

function getOption($option) {
  $ret = '';
  switch ($option) {
    case 'sid':
      $ret = $this->sid;
      break;
    case 'version':
      $ret = -1;
      ldap_get_option($this->connection, LDAP_OPT_PROTOCOL_VERSION, $ret);
      break;
    case 'name':
      $ret = $this->name;
      break;
    case 'machine_name':
      $ret = $this->machine_name;
      break;
    case 'port':
      $ret = $this->port;
      break;
    case 'tls':
      $ret = $this->tls;
      break;
    case 'enc_type':
      $ret = $this->enc_type;
      break;
    case 'user_attr':
      $ret = isset($this->user_attr) ? $this->user_attr : NULL;
      break;
    case 'attr_filter':
      $ret = isset($this->attr_filter) ? $this->attr_filter : NULL;
      break;
    case 'basedn':
      $ret = isset($this->basedn) ? $this->basedn : NULL;
      break;
    case 'mail_attr':
      $ret = isset($this->mail_attr) ? $this->mail_attr : NULL;
      break;
    case 'puid_attr':
      $ret = isset($this->puid_attr) ? $this->puid_attr : NULL;
      break;
    case 'binary_puid':
      $ret = isset($this->binary_puid) ? $this->binary_puid : NULL;
      break;
    case 'binddn':
      $ret = isset($this->binddn) ? $this->binddn : NULL;
      break;
    case 'bindpw':
      $ret = isset($this->bindpw) ? $this->bindpw : NULL;
      break;
  }
  return $ret;
}