Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00032 class ilLDAPAttributeMappingUtils
00033 {
00041 public static function _getMappingRulesByClass($a_class)
00042 {
00043 $mapping_rule = array();
00044
00045 switch($a_class)
00046 {
00047 case 'inetOrgPerson':
00048 $mapping_rule['firstname'] = 'givenName';
00049 $mapping_rule['institution'] = 'o';
00050 $mapping_rule['department'] = 'departmentNumber';
00051 $mapping_rule['phone_home'] = 'homePhone';
00052 $mapping_rule['phone_mobile'] = 'mobile';
00053 $mapping_rule['email'] = 'mail';
00054 $mapping_rule['photo'] = 'jpegPhoto';
00055
00056
00057 case 'organizationalPerson':
00058 $mapping_rule['fax'] = 'facsimileTelephoneNumber';
00059 $mapping_rule['title'] = 'title';
00060 $mapping_rule['street'] = 'street';
00061 $mapping_rule['zipcode'] = 'postalCode';
00062 $mapping_rule['city'] = 'l';
00063 $mapping_rule['country'] = 'st';
00064
00065
00066 case 'person':
00067 $mapping_rule['lastname'] = 'sn';
00068 $mapping_rule['phone_office'] = 'telephoneNumber';
00069 break;
00070
00071 case 'ad_2003':
00072 $mapping_rule['firstname'] = 'givenName';
00073 $mapping_rule['lastname'] = 'sn';
00074 $mapping_rule['title'] = 'title';
00075 $mapping_rule['institution'] = 'company';
00076 $mapping_rule['department'] = 'department';
00077 $mapping_rule['phone_home'] = 'telephoneNumber';
00078 $mapping_rule['phone_mobile'] = 'mobile';
00079 $mapping_rule['email'] = 'mail';
00080 $mapping_rule['street'] = 'streetAddress';
00081 $mapping_rule['city'] = 'l,st';
00082 $mapping_rule['country'] = 'co';
00083 $mapping_rule['zipcode'] = 'postalCode';
00084 $mapping_rule['fax'] = 'facsimileTelephoneNumber';
00085 break;
00086 }
00087 return $mapping_rule ? $mapping_rule : array();
00088 }
00089
00090 }
00091
00092
00093 ?>