Add an enumeration for profile_name_enum
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Wed, 17 Feb 2010 21:17:55 +0000 (22:17 +0100)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Wed, 17 Feb 2010 21:17:55 +0000 (22:17 +0100)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
include/directory.enums.inc.php

index 095cd48..d2c816c 100644 (file)
@@ -29,6 +29,8 @@ class DirEnum
      * Each of these consts contains the basename of the class (its full name
      * being DE_$basename).
      */
+    const NAMETYPES      = 'nametypes';
+
     const BINETS         = 'binets';
     const GROUPESX       = 'groupesx';
     const SECTIONS       = 'sections';
@@ -259,6 +261,15 @@ abstract class DirEnumeration
 }
 // }}}
 
+// {{{ class DE_NameTypes
+// returns 'system' names ('lastname', 'lastname_marital', ...)
+class DE_NameTypes extends DirEnumeration
+{
+    protected $from     = 'profile_name_enum';
+    protected $valfield = 'type';
+}
+// }}}
+
 /** GROUPS
  */
 // {{{ class DE_Binets