User management for the world wide web

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

GenieGate_Api_Plugin_Apache_FlatGroupFile Class Reference

Helper class for working with Apache group files. More...

List of all members.

Public Member Functions

 GenieGate_Api_Plugin_Apache_FlatGroupFile ($filename)
 Constructor.

 parse ($filename)
 Reads the group info.

 removeUid ($uid)
 Remove $uid from groups.

 removeGid ($gid)
 Remove a group.

 addUid ($uid, $gid)
 Add user to a group.

 save ($fh)
 saves the group info to a file handle.


Detailed Description

Helper class for working with Apache group files.

This is used to read, write and alter groups in apache group files.

Definition at line 13 of file Apache.php.


Constructor & Destructor Documentation

GenieGate_Api_Plugin_Apache_FlatGroupFile filename  ) 
 

Constructor.

Definition at line 20 of file Apache.php.

References parse().


Member Function Documentation

addUid uid,
gid
 

Add user to a group.

This adds userID $uid to the group $gid

Parameters:
$uid - The user ID to add.
$gid - The group ID to add.

Definition at line 91 of file Apache.php.

parse filename  ) 
 

Reads the group info.

called in the constructor, generally one never needs to call this method, (unless you needed to re-use the same object)

Parameters:
$filename - As specified in the AuthGroupFile
Returns:
$tree - An associative array of arrays. (Group data)

Definition at line 33 of file Apache.php.

Referenced by GenieGate_Api_Plugin_Apache_FlatGroupFile().

removeGid gid  ) 
 

Remove a group.

This function removes a group ID, (including all members within that group)

Parameters:
$gid - Group ID to remove.

Definition at line 81 of file Apache.php.

removeUid uid  ) 
 

Remove $uid from groups.

This iterates through removing $uid from all of the groups

Parameters:
$uid - The user ID.

Definition at line 64 of file Apache.php.

save fh  ) 
 

saves the group info to a file handle.

This stores the resulting groups file. (this must be called to make changes permanent.)

Parameters:
$fh - File handle to write to.

Definition at line 106 of file Apache.php.


The documentation for this class was generated from the following file:
DoxyGen Documentation generated by DoxyGen