The TownInfo
class provides functions to access town information.
With get()
get data of a specific town id - and use getTowns()
to get all towns of a user. With set()
you can set town information of an existing town.
Definition at line 28 of file lib/towninfo.php.
Public Member Functions | |
TownInfo (&$oDB, &$oLog) | |
constructor. | |
add ($x, $y, $strName=', $intPlayer=1, $strInfos=', $intTownhall=0, $intSight=0) | |
add a town, all parameters except x and y are optional | |
get ($x, $y) | |
get a town by coords | |
getById ($intTownId=0) | |
get infos for a town | |
getTowns ($intPlayerId, $intNoTown=0) | |
get towns of a user | |
set ($intTownId, $strName, $intPlayer=-1, $intSight=-1, $intTownhall=-1, $strInfos=-1, $booPrepend=false) | |
update infos for a town | |
delete ($intTown, $x, $y) | |
delete a town by id | |
Public Attributes | |
$oDB | |
DB object. | |
$oLog | |
Log object. |
|
constructor. set the objects
Definition at line 39 of file lib/towninfo.php. |
|
add a town, all parameters except x and y are optional
Definition at line 57 of file lib/towninfo.php. |
|
delete a town by id
Definition at line 162 of file lib/towninfo.php. |
|
get a town by coords
Definition at line 70 of file lib/towninfo.php. References $sqlResult. |
|
get infos for a town
Definition at line 85 of file lib/towninfo.php. References $aInfo. |
|
get towns of a user
Definition at line 108 of file lib/towninfo.php. References $aRow. |
|
update infos for a town
Definition at line 130 of file lib/towninfo.php. References $intPlayer, and $intSight. |
|
DB object.
Definition at line 30 of file lib/towninfo.php. Referenced by TownInfo(). |
|
Log object.
Definition at line 31 of file lib/towninfo.php. Referenced by TownInfo(). |