Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Guild Class Reference

List of all members.

Detailed Description

Class to do guild operations.

The Guild class provides functions to configure guilds.

Use add() or delete() to add/delete a guilds, set() to change properties and get() to retrieve them. getAll() returns a list of all available guilds

Author:
Robert Vock <smir@andaloria.de>

Definition at line 28 of file lib/guild.php.

Public Member Functions

 Guild (&$oDB, &$oLog, &$oUser)
 constructor.
 get ($intId=0)
 get infos for a guild
 set ($intId, $strName, $strTag, $strFgColor, $strBgColor, $intDiplomacy)
 update guild values
 add ($strName, $strTag, $strFgColor=', $strBgColor=', $intDiplomacy=0)
 add a new guild
 delete ($intGuild)
 delete a guild and move all members to special guild "no guild"
 getAll ()
 get all guilds

Public Attributes

 $oDB
 DB object.
 $oLog
 Log object.
 $oUser


Constructor & Destructor Documentation

Guild::Guild &$  oDB,
&$  oLog,
&$  oUser
 

constructor.

set the objects

Parameters:
$oDB reference to database object
$oLog reference to logger object
$oUser reference to the User object

Definition at line 41 of file lib/guild.php.

References $oDB, $oLog, and $oUser.


Member Function Documentation

Guild::add strName,
strTag,
strFgColor = ',
strBgColor = ',
intDiplomacy = 0
 

add a new guild

Parameters:
$strName new guild name
$strTag new guildtag
$strFgColor new textcolor
$strBgColor new backgroundcolor
$intDiplomacy diplomacy to this guild
Returns:
boolean (false if guild already exists)

Definition at line 93 of file lib/guild.php.

Guild::delete intGuild  ) 
 

delete a guild and move all members to special guild "no guild"

Parameters:
$intGuild id of guild to delete
Returns:
bool, true on success

Definition at line 129 of file lib/guild.php.

Guild::get intId = 0  ) 
 

get infos for a guild

Parameters:
$intId id of guild
Returns:
false or array with guild infos

Definition at line 53 of file lib/guild.php.

References $aRow.

Guild::getAll  ) 
 

get all guilds

Returns:
array

Definition at line 145 of file lib/guild.php.

References $aRow, and $sqlResult.

Guild::set intId,
strName,
strTag,
strFgColor,
strBgColor,
intDiplomacy
 

update guild values

Parameters:
$intId id of the guild
$strName new guild name
$strTag new guildtag
$strFgColor new textcolor
$strBgColor new backgroundcolor
$intDiplomacy diplomacy to this guild

Definition at line 76 of file lib/guild.php.


Member Data Documentation

Guild::$oDB
 

DB object.

Definition at line 30 of file lib/guild.php.

Referenced by Guild().

Guild::$oLog
 

Log object.

Definition at line 31 of file lib/guild.php.

Referenced by Guild().

Guild::$oUser
 

Definition at line 32 of file lib/guild.php.

Referenced by Guild().


The documentation for this class was generated from the following file:
Generated on Sun May 8 19:29:46 2005 for PhpMap by  doxygen 1.4.2