Class RSDEngineFunction

Description

Helper class for generating a function.

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


1 new RSDEngineFunctionChildClass($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, "myFunction", $functionBodyCode);
and use the methods getCode/toRSDFile.

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


	
			
Variable Summary
mixed $code
Array $config
Method Summary
RSDEngineFunction RSDEngineFunction (Array $config, [String $functionName = false], [String $code = false])
String getCode ()
String getFunctionName ()
Variables
mixed $code = false (line 63)

The body of the function 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 $functionName = false (line 58)

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

Methods
Constructor RSDEngineFunction (line 79)

Constructor that does the initialization.

RSDEngineFunction RSDEngineFunction (Array $config, [String $functionName = false], [String $code = false])
  • Array $config: An associative array containing all configuration options.
  • String $functionName: The name of the function to generate. Passing this argument makes only sense if the method getFunctionName does not get overwritten. This argument is optional. The default is false.
  • String $code: The code of the file to generate. Passing this argument makes only sense if the method getCode does not get overwritten. This argument is optional. The default is false.
getCode (line 99)

Returns the code for this function.

String getCode ()
getFunctionName (line 90)

Returns the function name.

String getFunctionName ()
toRSDFile (line 107)

Returns a new instance of RSDEngineFile.

  • return: Contains just this function.
RSDEngineFile toRSDFile ()

Documentation generated on Mon, 8 Dec 2003 13:12:48 +0100 by phpDocumentor 1.2.3