Static Public Member Functions

ilLDAPAttributeMappingUtils Class Reference
[Services/LDAP]

A collection of static utility functions for LDAP attribute mapping. More...

Static Public Member Functions

static _getMappingRulesByClass ($a_class)
 Get mapping rule by objectClass.

Detailed Description

A collection of static utility functions for LDAP attribute mapping.

Author:
Stefan Meyer <smeyer@databay.de>
Version:
$Id$

Definition at line 32 of file class.ilLDAPAttributeMappingUtils.php.


Member Function Documentation

static ilLDAPAttributeMappingUtils::_getMappingRulesByClass ( a_class  )  [static]

Get mapping rule by objectClass.

public

Parameters:
string 

Definition at line 41 of file class.ilLDAPAttributeMappingUtils.php.

Referenced by ilLDAPSettingsGUI::chooseMapping().

        {
                $mapping_rule = array();
                
                switch($a_class)
                {
                        case 'inetOrgPerson':
                                $mapping_rule['firstname'] = 'givenName';
                                $mapping_rule['institution'] = 'o';
                                $mapping_rule['department'] = 'departmentNumber';
                                $mapping_rule['phone_home'] = 'homePhone';
                                $mapping_rule['phone_mobile'] = 'mobile';
                                $mapping_rule['email'] = 'mail';
                                $mapping_rule['photo'] = 'jpegPhoto';
                                // No break since it inherits from organizationalPerson and person
                                
                        case 'organizationalPerson':
                                $mapping_rule['fax'] = 'facsimileTelephoneNumber';
                                $mapping_rule['title'] = 'title';
                                $mapping_rule['street'] = 'street';
                                $mapping_rule['zipcode'] = 'postalCode';
                                $mapping_rule['city'] = 'l';
                                $mapping_rule['country'] = 'st';
                                // No break since it inherits from person
                                
                        case 'person':
                                $mapping_rule['lastname'] = 'sn';
                                $mapping_rule['phone_office'] = 'telephoneNumber';
                                break;
                                
                        case 'ad_2003':
                                $mapping_rule['firstname'] = 'givenName';
                                $mapping_rule['lastname'] = 'sn';
                                $mapping_rule['title'] = 'title';
                                $mapping_rule['institution'] = 'company';
                                $mapping_rule['department'] = 'department';
                                $mapping_rule['phone_home'] = 'telephoneNumber';
                                $mapping_rule['phone_mobile'] = 'mobile';
                                $mapping_rule['email'] = 'mail';
                                $mapping_rule['street'] = 'streetAddress';
                                $mapping_rule['city'] = 'l,st';
                                $mapping_rule['country'] = 'co';
                                $mapping_rule['zipcode'] = 'postalCode';
                                $mapping_rule['fax'] = 'facsimileTelephoneNumber';
                                break;
                }
                return $mapping_rule ? $mapping_rule : array();
        }

Here is the caller graph for this function:


The documentation for this class was generated from the following file: