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

Tools Class Reference

List of all members.

Detailed Description

This class provides some tools for administrators.

The Tools class provides tools for administrators. Currently there is clean() to clean up the database which you will need to execute after every Andaloria-Server restart. Additionally csvimport() imports the map (landscape) from a csv file which usually is provided by the WDS-Team on their homepage.

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

Robert Vock <smir@andaloria.de>

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

Public Member Functions

 Tools (&$oDB)
 set the database object
 clean ($booCleanMap)
 clean the database
 csvimport ($intServerId, $intLine=0, $intLinesPerCall=10, $booDbIsClean=false)
 csv import of map

Public Attributes

 $oDB
 reference to Database object


Constructor & Destructor Documentation

Tools::Tools &$  oDB  ) 
 

set the database object

Parameters:
$oDB reference to database object

Definition at line 38 of file lib/tools.php.

References $oDB.


Member Function Documentation

Tools::clean booCleanMap  ) 
 

clean the database

Parameters:
$booCleanMap if true, the map entries are deleted as well
Returns:
int number of deleted/changed rows

Definition at line 48 of file lib/tools.php.

References $intCount.

Tools::csvimport intServerId,
intLine = 0,
intLinesPerCall = 10,
booDbIsClean = false
 

csv import of map

Parameters:
$intServerId id of the Server
$intLine continue with this line
$intLinesPerCall how many lines should the function import per call of this function
$booDbIsClean is the Database clean? if this bool is set to true, the function won't check the fields and will insert everything
Returns:
true, if finished,
false if csv file does not exist or cannot be opened,
or an int with line nr to continue

Definition at line 78 of file lib/tools.php.

References $aField, $aRow, $booDbIsClean, $intCount, $intTime, $x, and $y.


Member Data Documentation

Tools::$oDB
 

reference to Database object

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

Referenced by Tools().


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