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

Field Class Reference

List of all members.

Detailed Description

Class to change field information.

The Field class provides functions to change field information.

Use add() to add a new (dummy) town and set() to set field properties. With get() you can get field information and with delete() it.

Author:
Carsten Bormann <jisuga@terta.kn-bremen.de>

Robert Vock <smir@andaloria.de>

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

Public Member Functions

 Field (&$oDB, &$oUser, &$oTown, &$oLog)
 constructor.
 get ($x, $y)
 get infos for a field
 set ($x, $y, $strPlayer, $strTown, $intGuild, $intType, $intRace, $intTown, $intSight)
 update a field
 add ($x, $y, $intTownType=-1)
 add a new town dummy
 delete ($x, $y)
 delete a town from a field.

Public Attributes

 $oDB
 DB object.
 $oUser
 reference to user object
 $oLog
 Log object.
 $aField
 Infos for this field.
 $oTown
 Town object.


Constructor & Destructor Documentation

Field::Field &$  oDB,
&$  oUser,
&$  oTown,
&$  oLog
 

constructor.

set the objects

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

Definition at line 44 of file lib/field.php.

References $oDB, $oLog, $oTown, and $oUser.


Member Function Documentation

Field::add x,
y,
intTownType = -1
 

add a new town dummy

Parameters:
$x x-coord of the field
$y y-coord of the field
$intTownType type of the town (-1 for town dummy, -11 for planned village)
Returns:
bool

Definition at line 214 of file lib/field.php.

References $intTownId, and get().

Field::delete x,
y
 

delete a town from a field.

If field does not exist, nothing happens

Parameters:
$x x-coord of the field
$y y-coord of the field
Returns:
bool

Definition at line 258 of file lib/field.php.

References $x, $y, and get().

Field::get x,
y
 

get infos for a field

Parameters:
$x x-coord of the field
$y y-coord of the field
Returns:
array with field infos

Definition at line 58 of file lib/field.php.

References $aRow, and $sqlResult.

Referenced by add(), delete(), and set().

Field::set x,
y,
strPlayer,
strTown,
intGuild,
intType,
intRace,
intTown,
intSight
 

update a field

Parameters:
$x x-coord of the field
$y y-coord of the field
$strPlayer (new) playername
$strTown (new) townname
$intGuild (new) guild id
$intType (new) type id
$intRace (new) race id
$intTown town type
$intSight how far can the town see
Returns:
bool

Definition at line 130 of file lib/field.php.

References $aRow, $booUpdate, $intGuild, $intRace, $intSight, $intType, $strPlayer, and get().


Member Data Documentation

Field::$aField
 

Infos for this field.

Definition at line 33 of file lib/field.php.

Field::$oDB
 

DB object.

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

Referenced by Field().

Field::$oLog
 

Log object.

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

Referenced by Field().

Field::$oTown
 

Town object.

Definition at line 34 of file lib/field.php.

Referenced by Field().

Field::$oUser
 

reference to user object

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

Referenced by Field().


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