ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLDAPAttributeMappingUtils.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27{
33 public static function _getMappingRulesByClass(string $a_class): 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 }
81}
A collection of static utility functions for LDAP attribute mapping.
static _getMappingRulesByClass(string $a_class)
Get mapping rule by objectClass.