You are here

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

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

File

ldap_authorization/LdapAuthorizationConsumerConf.class.php, line 157
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 = [];
  }
  return $array;
}