You are here

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

Same name and namespace in other branches
  1. 8.2 ldap_authorization/LdapAuthorizationConsumerConf.class.php \LdapAuthorizationConsumerConf::linesToArray()
  2. 7.2 ldap_authorization/LdapAuthorizationConsumerConf.class.php \LdapAuthorizationConsumerConf::linesToArray()
2 calls to LdapAuthorizationConsumerConf::linesToArray()
LdapAuthorizationConsumerConf::loadFromDb in ldap_authorization/LdapAuthorizationConsumerConf.class.php
LdapAuthorizationConsumerConfAdmin::populateFromDrupalForm in ldap_authorization/LdapAuthorizationConsumerConfAdmin.class.php

File

ldap_authorization/LdapAuthorizationConsumerConf.class.php, line 199
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;
}