Class CoughWriter

Description

Takes CoughClass objects and writes them disk.

It can check to see what is already on the disk, possibly provide access to the differences, or merge the differences, but the main focus is just on actually writing the contents.

  • author: Anthony Bush

Located in /cough_generator/CoughWriter.class.php (line 13)


	
			
Variable Summary
Method Summary
void __construct ([mixed $config = array()])
void initConfig (mixed $config)
boolean writeClasses ( $classes)
void writeToFile (string $fileName, string $fileContents)
Variables
DatabaseSchemaGeneratorConfig $config = null (line 27)

Configuration object for this class

  • access: protected
array $errorMessages = array() (line 20)

Error message storage

  • access: protected
Methods
Constructor __construct (line 35)

Construct with optional configuration parameters.

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

Retrieve any error messages set by other methods.

  • author: Anthony Bush
  • access: public
void getErrorMessages ()
initConfig (line 47)

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

  • throws: Exception
  • access: public
void initConfig (mixed $config)
  • mixed $config: - an array or CoughGeneratorConfig object (yes, the CoughWriter shares the CoughGenerator's config object.)
writeClasses (line 73)

Writes all the classes to disk, skipping starter classes if they already exist.

  • return: - true if no errors, false if not (use getErrorMessages())
  • author: Anthony Bush
  • access: public
boolean writeClasses ( $classes)
  • $classes
writeToFile (line 100)

Puts the given contents into the given file name.

  • author: Anthony Bush
  • access: protected
void writeToFile (string $fileName, string $fileContents)
  • string $fileName: the file name to write to.
  • string $fileContents: the contents to write.

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