Zend Framework  3.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ParameterGenerator Class Reference

Public Member Functions

 __construct ($name=null, $type=null, $defaultValue=null, $position=null, $passByReference=false)
 
 setType ($type)
 
 getType ()
 
 setName ($name)
 
 getName ()
 
 setDefaultValue ($defaultValue)
 Set the default value of the parameter.
 
 getDefaultValue ()
 
 setPosition ($position)
 
 getPosition ()
 
 getPassedByReference ()
 
 setPassedByReference ($passedByReference)
 
 setVariadic ($variadic)
 
 getVariadic ()
 
 generate ()
 
- Public Member Functions inherited from AbstractGenerator
 __construct ($options=[])
 
 setSourceDirty ($isSourceDirty=true)
 
 isSourceDirty ()
 
 setIndentation ($indentation)
 
 getIndentation ()
 
 setSourceContent ($sourceContent)
 
 getSourceContent ()
 
 setOptions ($options)
 

Static Public Member Functions

static fromReflection (ParameterReflection $reflectionParameter)
 
static fromArray (array $array)
 Generate from array.
 

Protected Attributes

 $name = null
 
 $type = null
 
 $defaultValue = null
 
 $position = null
 
 $passedByReference = false
 
- Protected Attributes inherited from AbstractGenerator
 $isSourceDirty = true
 
 $indentation = ' '
 
 $sourceContent = null
 

Additional Inherited Members

- Public Attributes inherited from AbstractGenerator
const LINE_FEED = "\n"
 Line feed to use in place of EOL.
 

Constructor & Destructor Documentation

__construct (   $name = null,
  $type = null,
  $defaultValue = null,
  $position = null,
  $passByReference = false 
)
Parameters
string$name
string$type
mixed$defaultValue
int$position
bool$passByReference

Member Function Documentation

static fromArray ( array  $array)
static

Generate from array.

name string [required] Class Name type string defaultvalue null|bool|string|int|float|array|ValueGenerator passedbyreference bool position int sourcedirty bool indentation string sourcecontent string

Exceptions
Exception\InvalidArgumentException
Parameters
array$array
Returns
ParameterGenerator
static fromReflection ( ParameterReflection  $reflectionParameter)
static
Parameters
ParameterReflection$reflectionParameter
Returns
ParameterGenerator
generate ( )
Returns
string

Implements GeneratorInterface.

getDefaultValue ( )
Returns
string
getName ( )
Returns
string
getPassedByReference ( )
Returns
bool
getPosition ( )
Returns
int
getType ( )
Returns
string
getVariadic ( )
Returns
bool
setDefaultValue (   $defaultValue)

Set the default value of the parameter.

Certain variables are difficult to express

Parameters
null | bool | string | int | float | array | ValueGenerator$defaultValue
Returns
ParameterGenerator
setName (   $name)
Parameters
string$name
Returns
ParameterGenerator
setPassedByReference (   $passedByReference)
Parameters
bool$passedByReference
Returns
ParameterGenerator
setPosition (   $position)
Parameters
int$position
Returns
ParameterGenerator
setType (   $type)
Parameters
string$type
Returns
ParameterGenerator
setVariadic (   $variadic)
Parameters
bool$variadic
Returns
ParameterGenerator

Member Data Documentation

$defaultValue = null
protected
$name = null
protected
$passedByReference = false
protected
$position = null
protected
$type = null
protected