Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

groups.php

Go to the documentation of this file.
00001 
00002 /** @file groups.php
00003 * Definition of class groups.
00004 */
00005 #include "xml_event_parser_user.php"
00006 /**
00007 * Users groups.
00008 * This class represents users groups database.
00009 */
00010 class groups : public  xml_event_parser_user
00011 {
00012 public:
00013   var groups = array();
00014   var current_group_name = '';
00015   /**
00016   * List defined groups.
00017   * @return array with groups names
00018   */
00019   function get_group_names()
00020   {
00021     names = array();
00022     foreach( this->groups as group_name => group )
00023     {
00024       names[] = group_name;
00025     }
00026     return names;
00027   }
00028   /**
00029   * Return specific group.
00030   * @param string group_name - group to return
00031   * @return list of users names in group
00032   */
00033   function get_group( group_name )
00034   {
00035     if( isset( this->groups[ group_name ] ) )
00036       return this->groups[ group_name ];
00037     else
00038       return '';
00039   }
00040 
00041   function xep_open_groups_group( attributes )
00042   {
00043     this->current_group_name = attributes[ 'name' ];
00044     this->groups[ this->current_group_name ] = array();
00045   }
00046 
00047   function xep_close_groups_group()
00048   {
00049     this->current_group_name = '';
00050   }
00051 
00052   function xep_open_groups_group_user( attributes )
00053   {
00054     this->groups[ this->current_group_name ][] = attributes[ 'name' ];
00055   }
00056 }
00057 X-Powered-By: PHP/4.0.8-dev
00058 Content-type: text/html
00059 
00060 

Generated on Tue Mar 11 08:35:13 2003 for SES by doxygen1.2.16