Class RSDEngineClass

Description

Helper class for generating a class.

There are two ways of using this class. The first one is to extend it and to overwrite the methods getClassName, getInstanceName and getCode. This is recommendable if the class you want to generate is rather complex. You would call the constructor with only one argument:


1 new RSDEngineClassChildClass($config);
The second way to use this class makes only sense if $config is not needed for generating your class. Call the constructor like this:

1 new RSDEngineClass(false, "MyClass", "myClass", $classCode);
and use the methods getCode/toRSDFile.

Located in /code/framework/RSDEngine/RSDEngineClass.php (line 48)


	
			
Direct descendents
Class Description
RSDEngineDBApplicationBaseClass Generates the application base class (the main class) for database backended applications.
RSDEngineDBApplicationClass Generates the Application class (the main class) for database backended applications.
RSDEngineErrorManagerClass Generates the Application class (the main class) for database backended applications.
RSDEngineSmartyBaseClass Generates a class extending the class Smarty.
RSDEngineSmartyClass Generates a class extending the class Smarty.
Variable Summary
mixed $className
mixed $code
Array $config
boolean $preventWriting
Method Summary
RSDEngineClass RSDEngineClass (Array &$config, [String $className = false], [String $instanceName = false], [String $code = false])
String getClassName ()
String getCode ()
String getInstanceName ()
void setWrite (String $write)
Variables
mixed $className = false (line 58)

The name of the class to generate. Gets optionally set inside the constructor method.

mixed $code = false (line 68)

The code of the class to generate. Gets optionally set inside the constructor method.

Array $config = array() (line 53)

An associative array containing all configuration options. Gets set inside the constructor method.

mixed $instanceName = false (line 63)

The instance name of the class to generate. Gets optionally set inside the constructor method.

boolean $overwriteExisting = true (line 73)

Whether to overwrite an existing class file.


Redefined in descendants as:
boolean $preventWriting = false (line 78)

Whether to prevent writing this file.

Methods
Constructor RSDEngineClass (line 98)

Constructor that does the initialization.

RSDEngineClass RSDEngineClass (Array &$config, [String $className = false], [String $instanceName = false], [String $code = false])
  • Array $config: An associative array containing all configuration options.
  • String $className: The name of the class to generate. Passing this argument makes only sense if the method getClassName does not get overwritten. This argument is optional. The default is false.
  • String $instanceName: The instance name of the class to generate. Passing this argument makes only sense if the method getInstanceName does not get overwritten. This argument is optional. The default is false.
  • String $code: The code of the class to generate. Passing this argument makes only sense if the method getCode does not get overwritten. This argument is optional. The default is false.
getClassName (line 110)

Returns the class name.

String getClassName ()

Redefined in descendants as:
getCode (line 128)

Returns the code for this class.

String getCode ()

Redefined in descendants as:
getInstanceName (line 119)

Returns the instance name.

String getInstanceName ()

Redefined in descendants as:
setWrite (line 136)

Sets the properties preventWriting and overwriteExisting based on the string passed as argument

void setWrite (String $write)
  • String $write: 'true', 'false' or 'overwrite.
toRSDFile (line 153)

Returns a new instance of RSDEngineFile.

  • return: Contains just the class code.
RSDEngineFile toRSDFile ()

Documentation generated on Mon, 8 Dec 2003 13:10:45 +0100 by phpDocumentor 1.2.3