ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilLDAPAttributeMappingUtils.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
33 {
41  public static function _getMappingRulesByClass($a_class)
42  {
43  $mapping_rule = array();
44 
45  switch($a_class)
46  {
47  case 'inetOrgPerson':
48  $mapping_rule['firstname'] = 'givenName';
49  $mapping_rule['institution'] = 'o';
50  $mapping_rule['department'] = 'departmentNumber';
51  $mapping_rule['phone_home'] = 'homePhone';
52  $mapping_rule['phone_mobile'] = 'mobile';
53  $mapping_rule['email'] = 'mail';
54  $mapping_rule['photo'] = 'jpegPhoto';
55  // No break since it inherits from organizationalPerson and person
56 
57  case 'organizationalPerson':
58  $mapping_rule['fax'] = 'facsimileTelephoneNumber';
59  $mapping_rule['title'] = 'title';
60  $mapping_rule['street'] = 'street';
61  $mapping_rule['zipcode'] = 'postalCode';
62  $mapping_rule['city'] = 'l';
63  $mapping_rule['country'] = 'st';
64  // No break since it inherits from person
65 
66  case 'person':
67  $mapping_rule['lastname'] = 'sn';
68  $mapping_rule['phone_office'] = 'telephoneNumber';
69  break;
70 
71  case 'ad_2003':
72  $mapping_rule['firstname'] = 'givenName';
73  $mapping_rule['lastname'] = 'sn';
74  $mapping_rule['title'] = 'title';
75  $mapping_rule['institution'] = 'company';
76  $mapping_rule['department'] = 'department';
77  $mapping_rule['phone_home'] = 'telephoneNumber';
78  $mapping_rule['phone_mobile'] = 'mobile';
79  $mapping_rule['email'] = 'mail';
80  $mapping_rule['street'] = 'streetAddress';
81  $mapping_rule['city'] = 'l,st';
82  $mapping_rule['country'] = 'co';
83  $mapping_rule['zipcode'] = 'postalCode';
84  $mapping_rule['fax'] = 'facsimileTelephoneNumber';
85  break;
86  }
87  return $mapping_rule ? $mapping_rule : array();
88  }
89 
90 }
91 
92 
93 ?>