PhpGenerator: ezcPhpGeneratorParameter
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcPhpGeneratorParameter
|
ezcPhpGeneratorParameter holds information about a function or method parameter. [
source]
Constants
VALUE
= 2
|
Specifies that $variable contains data that should be inserted directly into the generated code using var_export. |
VARIABLE
= 1
|
Specifies that $variable contains the name of a variable which exists in the generated code. |
Member Variables
|
public int |
$type
The type of the parameter. Use either VARIABLE or VALUE. |
|
public mixed |
$variable
= ''
The actual data of the variable if it is a VALUE type or the name of the variable if it is a VARIABLE type. |
Method Summary
|
public ezcPhpGeneratorParameter |
__construct(
[$variable = ''], [$type = ezcPhpGeneratorParameter::VARIABLE] )
Constructs a new ezcPhpGeneratorParameter. |
|
public static ezcPhpGeneratorParameter |
__set_state(
$array )
Returns a new instance of this class with the data specified by $array. |
Methods
__construct
ezcPhpGeneratorParameter __construct(
[
$variable = ''], [int
$type = ezcPhpGeneratorParameter::VARIABLE] )
Constructs a new ezcPhpGeneratorParameter.
Parameters
| Name |
Type |
Description |
$type |
int |
Controls if $variable contains the name of a variable or actual data. $param string $variable Either the name of a variable or variable data. |
$variable |
|
|
__set_state
Returns a new instance of this class with the data specified by $array.
$array contains all the data members of this class in the form: array('member_name'=>value).
__set_state makes this class exportable with var_export. var_export() generates code, that calls this method when it is parsed with PHP.
Last updated: Fri, 02 Nov 2007