protected function LdapAuthorizationConsumerConf::pipeListToArray in Lightweight Directory Access Protocol (LDAP) 7
Same name and namespace in other branches
- 8.2 ldap_authorization/LdapAuthorizationConsumerConf.class.php \LdapAuthorizationConsumerConf::pipeListToArray()
- 7.2 ldap_authorization/LdapAuthorizationConsumerConf.class.php \LdapAuthorizationConsumerConf::pipeListToArray()
3 calls to LdapAuthorizationConsumerConf::pipeListToArray()
- LdapAuthorizationConsumerConf::loadFromDb in ldap_authorization/
LdapAuthorizationConsumerConf.class.php - LdapAuthorizationConsumerConfAdmin::populateFromDrupalForm in ldap_authorization/
LdapAuthorizationConsumerConfAdmin.class.php - LdapAuthorizationConsumerConfAdmin::save in ldap_authorization/
LdapAuthorizationConsumerConfAdmin.class.php
File
- ldap_authorization/
LdapAuthorizationConsumerConf.class.php, line 215 - 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;
}