You are here

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

Same name and namespace in other branches
  1. 8.2 ldap_query/LdapQuery.class.php \LdapQuery::linesToArray()
  2. 7.2 ldap_query/LdapQuery.class.php \LdapQuery::linesToArray()
1 call to LdapQuery::linesToArray()
LdapQuery::__construct in ldap_query/LdapQuery.class.php
Constructor Method

File

ldap_query/LdapQuery.class.php, line 186
Defines server classes and related functions.

Class

LdapQuery
LDAP Server Class

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;
}