DiogenesDatabaseCreator Class Reference

Inheritance diagram for DiogenesDatabaseCreator:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 DiogenesDatabaseCreator ($opt_table)
 connect ()
 debug ($msg)
 info ($msg)
 error ($msg)
 upgradeDb ($newversion)
 getVersion ()
 setVersion ($newversion)
 parseOptions ($argv, $dbdb, $dbhost, $dbuser, $dbpass)
 syntax ($script)
 run ()

Public Attributes

 $opt_info = true
 $opt_debug = false
 $opt_table
 $versions = array()

Detailed Description

This class is used to create, update and remove databases

Definition at line 27 of file diogenes.database-creator.inc.php.


Member Function Documentation

DiogenesDatabaseCreator::DiogenesDatabaseCreator ( opt_table  ) 

Initialisation

Parameters:
$opt_table 

Definition at line 45 of file diogenes.database-creator.inc.php.

References $opt_table.

DiogenesDatabaseCreator::connect (  ) 

Connect to the database

Definition at line 54 of file diogenes.database-creator.inc.php.

References debug(), and error().

Referenced by run().

Here is the call graph for this function:

DiogenesDatabaseCreator::debug ( msg  ) 

Displays a debugging message.

Parameters:
$msg 

Definition at line 77 of file diogenes.database-creator.inc.php.

Referenced by connect().

DiogenesDatabaseCreator::info ( msg  ) 

Displays an info message.

Parameters:
$msg 

Definition at line 89 of file diogenes.database-creator.inc.php.

Referenced by DiogenesDbInit::preupgradeMaster(), run(), DiogenesDbInit::upgradeBarrel(), DiogenesDbInit::upgradeDb(), upgradeDb(), and DiogenesDbInit::upgradeMaster().

DiogenesDatabaseCreator::error ( msg  ) 

Displays an error message.

Parameters:
$msg 

Definition at line 101 of file diogenes.database-creator.inc.php.

Referenced by connect(), and run().

DiogenesDatabaseCreator::upgradeDb ( newversion  ) 

Upgrade the database from one version to the next

Parameters:
$newversion 

Reimplemented in DiogenesDbInit.

Definition at line 112 of file diogenes.database-creator.inc.php.

References info().

Referenced by run().

Here is the call graph for this function:

DiogenesDatabaseCreator::getVersion (  ) 

Retrieve the current database version

Definition at line 121 of file diogenes.database-creator.inc.php.

Referenced by run().

DiogenesDatabaseCreator::setVersion ( newversion  ) 

Set the current database version

Parameters:
$newversion 

Definition at line 138 of file diogenes.database-creator.inc.php.

Referenced by run().

DiogenesDatabaseCreator::parseOptions ( argv,
dbdb,
dbhost,
dbuser,
dbpass 
)

Parse command line options

Parameters:
$argv 
$dbdb 
$dbhost 
$dbuser 
$dbpass 

Definition at line 153 of file diogenes.database-creator.inc.php.

References syntax().

Here is the call graph for this function:

DiogenesDatabaseCreator::syntax ( script  ) 

Displays program usage.

Definition at line 206 of file diogenes.database-creator.inc.php.

Referenced by parseOptions().

DiogenesDatabaseCreator::run (  ) 

Main routine

Definition at line 225 of file diogenes.database-creator.inc.php.

References $versions, connect(), error(), getVersion(), info(), setVersion(), and upgradeDb().

Here is the call graph for this function:


Member Data Documentation

DiogenesDatabaseCreator::$opt_info = true

Do we show information messages?

Definition at line 29 of file diogenes.database-creator.inc.php.

DiogenesDatabaseCreator::$opt_debug = false

Do we show debugging info?

Definition at line 32 of file diogenes.database-creator.inc.php.

DiogenesDatabaseCreator::$opt_table

table containing options

Definition at line 35 of file diogenes.database-creator.inc.php.

Referenced by DiogenesDatabaseCreator().

DiogenesDatabaseCreator::$versions = array()

database versions history

Reimplemented in DiogenesDbInit.

Definition at line 38 of file diogenes.database-creator.inc.php.

Referenced by run().


The documentation for this class was generated from the following file:
Generated on Fri Jan 11 01:20:09 2008 for Diogenes by  doxygen 1.5.1