Class CoughGenerator

Description

CoughGenerator takes config and schema and generates CoughClass objects.

  • author: Anthony Bush

Located in /cough_generator/CoughGenerator.class.php (line 9)


	
			
Variable Summary
Method Summary
void __construct ([mixed $config = array()])
void addGeneratedClass (CoughClass $coughClass)
string generateBaseCollection ( $table)
string generateBaseObject ( $table)
array generateCoughClasses (mixed $schema)
void generateLoadSql ( $table, [ $excludeTableJoins = array()], [ $indent = ''])
array generatePhpdocTags ( $table)
string generateStarterCollection ( $table)
string generateStarterObject ( $table)
array getErrorMessages ()
void getWarnings ()
void initConfig ( $config)
void logException ( &$e)
Variables
DatabaseSchemaGeneratorConfig $config = null (line 16)

Configuration object for this class

  • access: protected
array $generatedClasses = array() (line 23)

Storage for the generated CoughClass objects

  • access: protected
Methods
Constructor __construct (line 31)

Construct with optional configuration parameters.

  • access: public
void __construct ([mixed $config = array()])
  • mixed $config: - either an array of configuration variables or a pre-constructed DatabaseSchemaGeneratorConfig object.
addGeneratedClass (line 120)

Add to the generated classes.

  • author: Anthony Bush
  • access: public
void addGeneratedClass (CoughClass $coughClass)
generateBaseCollection (line 627)

Generates the base collection class

  • return: the generated PHP code
  • author: Anthony Bush
  • access: protected
string generateBaseCollection ( $table)
  • $table
generateBaseObject (line 226)

Generates the base object class

  • return: the generated PHP code
  • author: Anthony Bush
  • access: protected
string generateBaseObject ( $table)
  • $table
generateCoughClasses (line 60)

Generates Cough classes from a Schema or SchemaTable object. (It just calls the appropriate generation method based on the object type.)

  • return: of CoughClass objects
  • author: Anthony Bush
  • access: public
array generateCoughClasses (mixed $schema)
  • mixed $schema: - Schema or SchemaTable
generateCoughClassesFromSchema (line 79)

Generates Cough classes from a Schema object.

  • author: Anthony Bush
  • access: public
void generateCoughClassesFromSchema ( $schema)
generateCoughClassesFromSchemaTable (line 94)

Generates Cough classes from a SchemaTable object.

  • author: Anthony Bush
  • access: public
void generateCoughClassesFromSchemaTable ( $table)
generateLoadSql (line 153)

Generate the loadSql for a given SchemaTable object (excluding WHERE clause).

  • author: Anthony Bush
  • access: protected
void generateLoadSql ( $table, [ $excludeTableJoins = array()], [ $indent = ''])
  • $table
  • $excludeTableJoins
  • $indent
generatePhpdocTags (line 130)

Generates an array of common phpDoc tags.

  • author: Anthony Bush
  • access: protected
array generatePhpdocTags ( $table)
  • $table
generateStarterCollection (line 718)

Generates the starter collection class

  • return: the generated PHP code
  • author: Anthony Bush
  • access: protected
string generateStarterCollection ( $table)
  • $table
generateStarterObject (line 675)

Generates the starter object class

  • return: the generated PHP code
  • author: Anthony Bush
  • access: protected
string generateStarterObject ( $table)
  • $table
getErrorMessages (line 836)

getErrorMesages() returns an array of error messages, if any.

  • return: of strings, each an error message (empty array if none).
  • author: Anthony Bush
  • access: public
array getErrorMessages ()
getGeneratedClasses (line 109)

Get the generated classes

  • return: of CoughClass objects.
  • author: Anthony Bush
  • access: public
array getGeneratedClasses ()
getWarnings (line 850)
  • access: public
void getWarnings ()
initConfig (line 42)

Initialize the configuration object given an array or pre-constructed configuration object.

  • throws: Exception
  • access: public
void initConfig ( $config)
  • $config
logException (line 846)

Logs the given exception (currently just saves the message to the error array)

  • author: Anthony Bush
  • access: protected
void logException ( &$e)
  • &$e

Documentation generated on Tue, 23 Sep 2008 22:48:22 -0500 by phpDocumentor 1.4.0