PhpGenerator: ezcPhpGeneratorParameter
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcPhpGeneratorParameter
|
ezcPhpGeneratorParameter holds information about a function or method parameter. [
source]
Parents
ezcBaseStruct
|
--ezcPhpGeneratorParameter
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(
[string
$variable = ''], [int
$type = ezcPhpGeneratorParameter::VARIABLE] )
Constructs a new ezcPhpGeneratorParameter.
Parameters
| Name |
Type |
Description |
$variable |
string |
Either the name of a variable or variable data. |
$type |
int |
Controls if $variable contains the name of a variable or actual data. |
__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.
Parameters
| Name |
Type |
Description |
$array |
array(string=>mixed) |
|
Last updated: Mon, 12 Nov 2007