• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

Services/LDAP/classes/class.ilLDAPAttributeMappingUtils.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2006 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
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                                 // No break since it inherits from organizationalPerson and person
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                                 // No break since it inherits from person
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 ?>

Generated on Fri Dec 13 2013 17:56:57 for ILIAS Release_3_9_x_branch .rev 46835 by  doxygen 1.7.1