Helper class for creating source files.
There are two ways of using this class. The first one is to extend it and to overwrite the methods getFilename, and getCode. This is recommendable if the file you want to create is rather complex. You would call the constructor with only one argument:
1 new RSDEngineFileChildClass($config);
The second way to use this class makes only sense if $config is not needed for creating your file. Call the constructor like this:
1 new RSDEngineClass(false, "myFilename.php", $fileCode);
Located in /code/framework/RSDEngine/RSDEngineFile.php (line 47)
Class | Description |
---|---|
RSDEngineControllerFile | Helper class for creating template files. |
RSDEngineDBApplicationConfigFile | Generates the configuration file for database backended applications. |
RSDEngineDBApplicationIndexFile | Generates a file called index.php to be put in the code directory. |
RSDEngineDBApplicationInitFile | Generates the init file. |
RSDEngineDBApplicationLogoutFile | Generates a file called logout.php to be put in the code directory. |
RSDEngineDBApplicationPrivateInitFile | Generates the private init file. |
RSDEngineDBApplicationPublicInitFile | Generates the public init file. |
RSDEngineTemplateFile | Helper class for creating template files. |
The code of the file to create. Gets set inside the constructor method.
An associative array containing all configuration options. Gets set inside the constructor method.
The directory to which to write the file.
The name of the file to create. Gets set inside the constructor method.
Whether to overwrite an existing file.
Whether to prevent writing this file.
An associative array containing related files. A class that extends RSDEngineFile and overwrites the method getCode might need this to communicate with other classes that are created. Gets set inside the method setRelatedClasses.
An associative array containing related files. A class that extends RSDEngineFile and overwrites the method getCode might need this to communicate with other files that are created. Gets set inside the method setRelatedFiles.
An associative array containing related files. A class that extends RSDEngineFile and overwrites the method getCode might need this to communicate with other functions that are created. Gets set inside the method setRelatedFunctions.
Constructor that does the initialization.
Returns the code for this file.
Returns the filename.
Sets the output direcotry.
$this->dir is set to the value passed as argument.
Sets the related classes.
$this->relatedClasses is set to the array passed as argument.
Sets the related files.
$this->relatedFiles is set to the array passed as argument.
Sets the related functions.
$this->relatedFunctions is set to the array passed as argument.
Sets the properties preventWriting and overwriteExisting based on the string passed as argument
Writes the file to a directory.
If this method is called without arguments or $dir === false the file will be written to $this->dir. Otherwise the file will be written to the directory passed as argument.
Documentation generated on Mon, 8 Dec 2003 13:12:46 +0100 by phpDocumentor 1.2.3