Class ValueGenerator

Summary

Fully Qualified Name: Zend\Code\Generator\ValueGenerator
Extends: AbstractGenerator

Description

Methods

Name Description Defined By
__construct() ValueGenerator
__toString() ValueGenerator
addConstant() Add constant to list ValueGenerator
deleteConstant() Delete constant from constant list ValueGenerator
escape() Quotes value for PHP code. ValueGenerator
generate() ValueGenerator
getArrayDepth() ValueGenerator
getAutoDeterminedType() ValueGenerator
getConstants() Return constant list ValueGenerator
getIndentation() AbstractGenerator
getOutputMode() ValueGenerator
getSourceContent() AbstractGenerator
getType() ValueGenerator
getValue() ValueGenerator
initEnvironmentConstants() Init constant list by defined and magic constants ValueGenerator
isSourceDirty() AbstractGenerator
isValidConstantType() ValueGenerator
setArrayDepth() ValueGenerator
setIndentation() AbstractGenerator
setOptions() AbstractGenerator
setOutputMode() ValueGenerator
setSourceContent() AbstractGenerator
setSourceDirty() AbstractGenerator
setType() ValueGenerator
setValue() ValueGenerator

Method Details

__construct()

Parameter Name Type Description
$value mixed
$type string
$outputMode string
$constants null|\SplArrayObject|\StdlibArrayObject

Returns:

__toString()

Returns: void

addConstant()

Add constant to list

Parameter Name Type Description
$constant string

Returns: $this

deleteConstant()

Delete constant from constant list

Parameter Name Type Description
$constant string

Returns: bool

escape()

Quotes value for PHP code.

Parameter Name Type Description
$input string Raw
$quote bool Whether

Returns: string PHP-ready code.

generate()

Returns: string

getArrayDepth()

Returns: int

getAutoDeterminedType()

Parameter Name Type Description
$value mixed

Returns: string

getConstants()

Return constant list

Returns: \SplArrayObject|\StdlibArrayObject

getIndentation()

Returns: string

getOutputMode()

Returns: string

getSourceContent()

Returns: string

getType()

Returns: string

getValue()

Returns: mixed

initEnvironmentConstants()

Init constant list by defined and magic constants

Returns:

isSourceDirty()

Returns: bool

isValidConstantType()

Returns: bool

setArrayDepth()

Parameter Name Type Description
$arrayDepth int

Returns: \ValueGenerator

setIndentation()

Parameter Name Type Description
$indentation string

Returns: \AbstractGenerator

setOptions()

Parameter Name Type Description
$options array|\Traversable

Returns: \AbstractGenerator

setOutputMode()

Parameter Name Type Description
$outputMode string

Returns: \ValueGenerator

setSourceContent()

Parameter Name Type Description
$sourceContent string

Returns: \AbstractGenerator

setSourceDirty()

Parameter Name Type Description
$isSourceDirty bool

Returns: \AbstractGenerator

setType()

Parameter Name Type Description
$type string

Returns: \ValueGenerator

setValue()

Parameter Name Type Description
$value mixed

Returns: \ValueGenerator

Top