Zeta Components Manual :: Docs For Class ezcPhpGeneratorParameter
PhpGenerator::ezcPhpGeneratorParameter
Class ezcPhpGeneratorParameter
ezcPhpGeneratorParameter holds information about a function or method parameter.
Source for this file: /PhpGenerator/src/structs/php_generator_parameter.php
ezcBaseStruct | --ezcPhpGeneratorParameter
Version: | //autogentag// |
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 static ezcPhpGeneratorParameter |
__set_state(
$array
)
Returns a new instance of this class with the data specified by $array. |
public ezcPhpGeneratorParameter |
__construct(
[ $variable
= ''] , [ $type
= ezcPhpGeneratorParameter::VARIABLE] )
Constructs a new ezcPhpGeneratorParameter. |
Methods
__set_state
static ezcPhpGeneratorParameter
__set_state(
$array
)
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) |
__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. |
Documentation generated by phpDocumentor 1.4.3