Zend\Code\Generator\PropertyGenerator
Synopsis
class PropertyGenerator
extends AbstractMemberGenerator
{
- // constants
- const FLAG_CONSTANT = 0x08;
- // Inherited constants from AbstractMemberGenerator
- const FLAG_ABSTRACT = 0x01;
- const FLAG_FINAL = 0x02;
- const FLAG_STATIC = 0x04;
- const FLAG_PUBLIC = 0x10;
- const FLAG_PROTECTED = 0x20;
- const FLAG_PRIVATE = 0x40;
- const VISIBILITY_PUBLIC = 'public';
- const VISIBILITY_PROTECTED = 'protected';
- const VISIBILITY_PRIVATE = 'private';
- // Inherited constants from AbstractGenerator
- const LINE_FEED = "\n";
- // members
- protected bool $isConst;
- protected PropertyValueGenerator $defaultValue;
- // Inherited members from AbstractMemberGenerator
- protected DocBlockGenerator $docBlock;
- protected string $name;
- protected int $flags;
- // Inherited members from AbstractGenerator
- protected bool $isSourceDirty;
- protected int|string $indentation;
- protected string $sourceContent;
- // methods
- public static PropertyGenerator fromReflection()
- public static PropertyGenerator fromArray()
- public void __construct()
- public PropertyGenerator setConst()
- public bool isConst()
- public PropertyGenerator setDefaultValue()
- public PropertyValueGenerator getDefaultValue()
- public string generate()
- // Inherited methods from AbstractMemberGenerator
- public AbstractMemberGenerator setFlags()
- public AbstractMemberGenerator addFlag()
- public AbstractMemberGenerator removeFlag()
- public AbstractMemberGenerator setAbstract()
- public bool isAbstract()
- public AbstractMemberGenerator setFinal()
- public bool isFinal()
- public AbstractMemberGenerator setStatic()
- public bool isStatic()
- public AbstractMemberGenerator setVisibility()
- public string getVisibility()
- public AbstractMemberGenerator setName()
- public string getName()
- public AbstractMemberGenerator setDocBlock()
- public DocBlockGenerator getDocBlock()
- // 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
Constants
Name | Value |
---|---|
FLAG_CONSTANT | 0x08 |
FLAG_ABSTRACT | 0x01 |
FLAG_FINAL | 0x02 |
FLAG_STATIC | 0x04 |
FLAG_PUBLIC | 0x10 |
FLAG_PROTECTED | 0x20 |
FLAG_PRIVATE | 0x40 |
VISIBILITY_PUBLIC | 'public' |
VISIBILITY_PROTECTED | 'protected' |
VISIBILITY_PRIVATE | 'private' |
LINE_FEED | "\n" |
Members
protected
- $defaultValue — Zend\Code\Generator\PropertyValueGenerator
- $docBlock — Zend\Code\Generator\DocBlockGenerator
- $flags — int
- $indentation — Zend\Code\Generator\int|string
- $isConst — Zend\Code\Generator\bool
- $isSourceDirty — Zend\Code\Generator\bool
- $name — string
- $sourceContent — string
Methods
public
- __construct()
- fromArray() — Generate from array
- fromReflection()
- generate()
- getDefaultValue()
- isConst()
- setConst()
- setDefaultValue()
Inherited from Zend\Code\Generator\AbstractMemberGenerator
public
- addFlag()
- getDocBlock()
- getName()
- getVisibility()
- isAbstract()
- isFinal()
- isStatic()
- removeFlag()
- setAbstract()
- setDocBlock()
- setFinal()
- setFlags()
- setName()
- setStatic()
- setVisibility()