ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilLDAPAttributeMappingUtils Class Reference

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

+ Collaboration diagram for ilLDAPAttributeMappingUtils:

Static Public Member Functions

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

Detailed Description

A collection of static utility functions for LDAP attribute mapping.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

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

Member Function Documentation

◆ _getMappingRulesByClass()

static ilLDAPAttributeMappingUtils::_getMappingRulesByClass ( string  $a_class)
static

Get mapping rule by objectClass.

Parameters
string$a_class
Returns
array<string, string>

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

33 : array
34 {
35 $mapping_rule = [];
36
37 switch ($a_class) {
38 case 'inetOrgPerson':
39 $mapping_rule['firstname'] = 'givenName';
40 $mapping_rule['institution'] = 'o';
41 $mapping_rule['department'] = 'departmentNumber';
42 $mapping_rule['phone_home'] = 'homePhone';
43 $mapping_rule['phone_mobile'] = 'mobile';
44 $mapping_rule['email'] = 'mail';
45 $mapping_rule['photo'] = 'jpegPhoto';
46 // no break since it inherits from organizationalPerson and person
47
48 case 'organizationalPerson':
49 $mapping_rule['fax'] = 'facsimileTelephoneNumber';
50 $mapping_rule['title'] = 'title';
51 $mapping_rule['street'] = 'street';
52 $mapping_rule['zipcode'] = 'postalCode';
53 $mapping_rule['city'] = 'l';
54 $mapping_rule['country'] = 'st';
55 // no break since it inherits from person
56
57 case 'person':
58 $mapping_rule['lastname'] = 'sn';
59 $mapping_rule['phone_office'] = 'telephoneNumber';
60 break;
61
62 case 'ad_2003':
63 $mapping_rule['firstname'] = 'givenName';
64 $mapping_rule['lastname'] = 'sn';
65 $mapping_rule['title'] = 'title';
66 $mapping_rule['institution'] = 'company';
67 $mapping_rule['department'] = 'department';
68 $mapping_rule['phone_home'] = 'telephoneNumber';
69 $mapping_rule['phone_mobile'] = 'mobile';
70 $mapping_rule['email'] = 'mail';
71 $mapping_rule['street'] = 'streetAddress';
72 $mapping_rule['city'] = 'l,st';
73 $mapping_rule['country'] = 'co';
74 $mapping_rule['zipcode'] = 'postalCode';
75 $mapping_rule['fax'] = 'facsimileTelephoneNumber';
76 break;
77 }
78
79 return $mapping_rule;
80 }

Referenced by ilLDAPSettingsGUI\chooseMappingCmd().

+ Here is the caller graph for this function:

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