Zend\Code\Generator\ValueGenerator
Synopsis
class ValueGenerator
extends AbstractGenerator
{
- // constants
- const TYPE_AUTO = 'auto';
- const TYPE_BOOLEAN = 'boolean';
- const TYPE_BOOL = 'bool';
- const TYPE_NUMBER = 'number';
- const TYPE_INTEGER = 'integer';
- const TYPE_INT = 'int';
- const TYPE_FLOAT = 'float';
- const TYPE_DOUBLE = 'double';
- const TYPE_STRING = 'string';
- const TYPE_ARRAY = 'array';
- const TYPE_CONSTANT = 'constant';
- const TYPE_NULL = 'null';
- const TYPE_OBJECT = 'object';
- const TYPE_OTHER = 'other';
- const OUTPUT_MULTIPLE_LINE = 'multipleLine';
- const OUTPUT_SINGLE_LINE = 'singleLine';
- // Inherited constants from AbstractGenerator
- const LINE_FEED = "\n";
- // members
- protected mixed $value;
- protected string $type;
- protected integer $arrayDepth;
- protected string $outputMode;
- protected array $allowedTypes;
- protected ArrayObject $constants;
- // Inherited members from AbstractGenerator
- protected bool $isSourceDirty;
- protected int|string $indentation;
- protected string $sourceContent;
- // methods
- public void __construct()
- public void initEnvironmentConstants()
- public $this addConstant()
- public bool deleteConstant()
- public ArrayObject getConstants()
- public bool isValidConstantType()
- public ValueGenerator setValue()
- public mixed getValue()
- public ValueGenerator setType()
- public string getType()
- public ValueGenerator setArrayDepth()
- public int getArrayDepth()
- protected string getValidatedType()
- public string getAutoDeterminedType()
- public string generate()
- public static string escape()
- public ValueGenerator setOutputMode()
- public string getOutputMode()
- public void __toString()
- // Inherited methods from AbstractGenerator
- public void __construct()
- public AbstractGenerator setSourceDirty()
- public bool isSourceDirty()
- public AbstractGenerator setIndentation()
- public string getIndentation()
- public AbstractGenerator setSourceContent()
- public string getSourceContent()
- public AbstractGenerator setOptions()
Hierarchy
Extends
Extended by
Constants
Name | Value |
---|---|
TYPE_AUTO | 'auto' |
TYPE_BOOLEAN | 'boolean' |
TYPE_BOOL | 'bool' |
TYPE_NUMBER | 'number' |
TYPE_INTEGER | 'integer' |
TYPE_INT | 'int' |
TYPE_FLOAT | 'float' |
TYPE_DOUBLE | 'double' |
TYPE_STRING | 'string' |
TYPE_ARRAY | 'array' |
TYPE_CONSTANT | 'constant' |
TYPE_NULL | 'null' |
TYPE_OBJECT | 'object' |
TYPE_OTHER | 'other' |
OUTPUT_MULTIPLE_LINE | 'multipleLine' |
OUTPUT_SINGLE_LINE | 'singleLine' |
LINE_FEED | "\n" |
Members
protected
- $allowedTypes — array
- $arrayDepth — int
- $constants
—
Zend\Stdlib\ArrayObject
Autodetectable constants - $indentation — Zend\Code\Generator\int|string
- $isSourceDirty — Zend\Code\Generator\bool
- $outputMode — string
- $sourceContent — string
- $type — string
- $value — mixed
Methods
protected
public
- __construct()
- __toString()
- addConstant() — Add constant to list
- deleteConstant() — Delete constant from constant list
- escape() — Quotes value for PHP code.
- generate()
- getArrayDepth()
- getAutoDeterminedType()
- getConstants() — Return constant list
- getOutputMode()
- getType()
- getValue()
- initEnvironmentConstants() — Init constant list by defined and magic constants
- isValidConstantType()
- setArrayDepth()
- setOutputMode()
- setType()
- setValue()