You are here

protected function LdapAuthorizationConsumerConf::linesToArray in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_authorization/LdapAuthorizationConsumerConf.class.php \LdapAuthorizationConsumerConf::linesToArray()
  2. 7 ldap_authorization/LdapAuthorizationConsumerConf.class.php \LdapAuthorizationConsumerConf::linesToArray()

File

ldap_authorization/LdapAuthorizationConsumerConf.class.php, line 144
class to encapsulate an ldap entry to authorization consumer ids mapping configuration

Class

LdapAuthorizationConsumerConf
LDAP Authorization Consumer Configuration

Code

protected function linesToArray($lines) {
  $lines = trim($lines);
  if ($lines) {
    $array = preg_split('/[\\n\\r]+/', $lines);
    foreach ($array as $i => $value) {
      $array[$i] = trim($value);
    }
  }
  else {
    $array = array();
  }
  return $array;
}