protected function LdapAuthorizationConsumerConf::pipeListToArray in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_authorization/LdapAuthorizationConsumerConf.class.php \LdapAuthorizationConsumerConf::pipeListToArray()
- 7 ldap_authorization/LdapAuthorizationConsumerConf.class.php \LdapAuthorizationConsumerConf::pipeListToArray()
1 call to LdapAuthorizationConsumerConf::pipeListToArray()
File
- ldap_authorization/
LdapAuthorizationConsumerConf.class.php, line 160 - class to encapsulate an ldap entry to authorization consumer ids mapping configuration
Class
- LdapAuthorizationConsumerConf
- LDAP Authorization Consumer Configuration
Code
protected function pipeListToArray($mapping_list_txt, $make_item0_lowercase = FALSE) {
$result_array = array();
$mappings = preg_split('/[\\n\\r]+/', $mapping_list_txt);
foreach ($mappings as $line) {
if (count($mapping = explode('|', trim($line))) == 2) {
$item_0 = $make_item0_lowercase ? drupal_strtolower(trim($mapping[0])) : trim($mapping[0]);
$result_array[] = array(
$item_0,
trim($mapping[1]),
);
}
}
return $result_array;
}