package Zend_Code_Generator

 Methods

__construct()

__construct($value, $type, $outputMode) 

Parameters

$value

$type

$outputMode

__toString()

__toString() 

Quotes value for PHP code.

escape(string $input, bool $quote) : string

Parameters

$input

string

Raw string.

$quote

bool

Whether add surrounding quotes or not.

Returns

stringPHP-ready code.

generate()

generate() : string

getArrayDepth()

getArrayDepth() : int

Returns

int

_getAutoDeterminedType()

getAutoDeterminedType(mixed $value) : string

Parameters

$value

mixed

Returns

string

getIndentation()

getIndentation() : string | int
Inherited

inherited_from \Zend\Code\Generator\AbstractGenerator::getIndentation()

Returns

stringint

getOutputMode()

getOutputMode() : string

Returns

string

getSourceContent()

getSourceContent() : string
Inherited

inherited_from \Zend\Code\Generator\AbstractGenerator::getSourceContent()

Returns

string

getType()

getType() : string

Returns

string

getValue()

getValue() : mixed

Returns

mixed

isSourceDirty()

isSourceDirty() : bool
Inherited

inherited_from \Zend\Code\Generator\AbstractGenerator::isSourceDirty()

Returns

bool

isValidConstantType()

isValidConstantType() : bool

Returns

bool

setArrayDepth()

setArrayDepth(int $arrayDepth) : \Zend\Code\Generator\ValueGenerator

Parameters

$arrayDepth

int

Returns

setIndentation()

setIndentation(string | int $indentation) : \Zend\Code\Generator\AbstractGenerator
Inherited

inherited_from \Zend\Code\Generator\AbstractGenerator::setIndentation()

Parameters

$indentation

stringint

Returns

setOptions()

setOptions(array | \Traversable $options) : \Zend\Code\Generator\self
Inherited

inherited_from \Zend\Code\Generator\AbstractGenerator::setOptions()

Parameters

$options

array\Traversable

Exceptions

\Zend\Code\Generator\Exception\InvalidArgumentException

Returns

\Zend\Code\Generator\self

setOutputMode()

setOutputMode(string $outputMode) : \Zend\Code\Generator\ValueGenerator

Parameters

$outputMode

string

Returns

setSourceContent()

setSourceContent(string $sourceContent) : \Zend\Code\Generator\AbstractGenerator
Inherited

inherited_from \Zend\Code\Generator\AbstractGenerator::setSourceContent()

Parameters

$sourceContent

string

Returns

setSourceDirty()

setSourceDirty(bool $isSourceDirty) : \Zend\Code\Generator\AbstractGenerator
Inherited

inherited_from \Zend\Code\Generator\AbstractGenerator::setSourceDirty()

Parameters

$isSourceDirty

bool

Returns

setType()

setType(string $type) : \Zend\Code\Generator\ValueGenerator

Parameters

$type

string

Returns

setValue()

setValue(mixed $value) : \Zend\Code\Generator\ValueGenerator

Parameters

$value

mixed

Returns

_getValidatedType()

getValidatedType(string $type) : string

Parameters

$type

string

Returns

string

 Properties

 

$allowedTypes

$allowedTypes : array

 

$arrayDepth

$arrayDepth : int

 

<p>4 spaces by default</p>

$indentation : int | string
Inherited

inherited_from \Zend\Code\Generator\AbstractGenerator::$$indentation
 

$isSourceDirty

$isSourceDirty : bool
Inherited

inherited_from \Zend\Code\Generator\AbstractGenerator::$$isSourceDirty
 

$outputMode

$outputMode : string

 

$sourceContent

$sourceContent : string
Inherited

inherited_from \Zend\Code\Generator\AbstractGenerator::$$sourceContent
 

$type

$type : string

 

$value

$value : mixed

 Constants

 

Line feed to use in place of EOL

LINE_FEED 
Inherited

inherited_from \Zend\Code\Generator\AbstractGenerator::LINE_FEED
 

OUTPUT_MULTIPLE_LINE

OUTPUT_MULTIPLE_LINE 

 

OUTPUT_SINGLE_LINE

OUTPUT_SINGLE_LINE 

 

TYPE_ARRAY

TYPE_ARRAY 

 

TYPE_AUTO

TYPE_AUTO 

 

TYPE_BOOL

TYPE_BOOL 

 

TYPE_BOOLEAN

TYPE_BOOLEAN 

 

TYPE_CONSTANT

TYPE_CONSTANT 

 

TYPE_DOUBLE

TYPE_DOUBLE 

 

TYPE_FLOAT

TYPE_FLOAT 

 

TYPE_INT

TYPE_INT 

 

TYPE_INTEGER

TYPE_INTEGER 

 

TYPE_NULL

TYPE_NULL 

 

TYPE_NUMBER

TYPE_NUMBER 

 

TYPE_OBJECT

TYPE_OBJECT 

 

TYPE_OTHER

TYPE_OTHER 

 

TYPE_STRING

TYPE_STRING