Zend Framework
3.0
|
Public Member Functions | |
__construct ($name=null, $namespaceName=null, $flags=null, $extends=null, $interfaces=[], $properties=[], $methods=[], $docBlock=null) | |
setName ($name) | |
getName () | |
setNamespaceName ($namespaceName) | |
getNamespaceName () | |
setContainingFileGenerator (FileGenerator $fileGenerator) | |
getContainingFileGenerator () | |
setDocBlock (DocBlockGenerator $docBlock) | |
getDocBlock () | |
setFlags ($flags) | |
addFlag ($flag) | |
removeFlag ($flag) | |
setAbstract ($isAbstract) | |
isAbstract () | |
setFinal ($isFinal) | |
isFinal () | |
setExtendedClass ($extendedClass) | |
getExtendedClass () | |
setImplementedInterfaces (array $implementedInterfaces) | |
getImplementedInterfaces () | |
getConstant ($constantName) | |
getConstants () | |
hasConstant ($constantName) | |
addConstantFromGenerator (PropertyGenerator $constant) | |
Add constant from PropertyGenerator. | |
addConstant ($name, $value) | |
Add Constant. | |
addConstants (array $constants) | |
addProperties (array $properties) | |
addProperty ($name, $defaultValue=null, $flags=PropertyGenerator::FLAG_PUBLIC) | |
Add Property from scalars. | |
addPropertyFromGenerator (PropertyGenerator $property) | |
Add property from PropertyGenerator. | |
getProperties () | |
getProperty ($propertyName) | |
addUse ($use, $useAlias=null) | |
Add a class to "use" classes. | |
getUses () | |
Returns the "use" classes. | |
hasProperty ($propertyName) | |
addMethods (array $methods) | |
addMethod ($name, array $parameters=[], $flags=MethodGenerator::FLAG_PUBLIC, $body=null, $docBlock=null) | |
Add Method from scalars. | |
addMethodFromGenerator (MethodGenerator $method) | |
Add Method from MethodGenerator. | |
getMethods () | |
getMethod ($methodName) | |
removeMethod ($methodName) | |
hasMethod ($methodName) | |
addTrait ($trait) | |
addTraits (array $traits) | |
hasTrait ($traitName) | |
getTraits () | |
removeTrait ($traitName) | |
addTraitAlias ($method, $alias, $visibility=null) | |
getTraitAliases () | |
addTraitOverride ($method, $traitsToReplace) | |
removeTraitOverride ($method, $overridesToRemove=null) | |
getTraitOverrides () | |
isSourceDirty () | |
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 (ClassReflection $classReflection) |
Build a Code Generation Php Object from a Class Reflection. | |
static | fromArray (array $array) |
Generate from array. | |
Public Attributes | |
const | OBJECT_TYPE = "class" |
const | IMPLEMENTS_KEYWORD = "implements" |
const | FLAG_ABSTRACT = 0x01 |
const | FLAG_FINAL = 0x02 |
Public Attributes inherited from AbstractGenerator | |
const | LINE_FEED = "\n" |
Line feed to use in place of EOL. | |
Protected Attributes | |
$containingFileGenerator = null | |
$namespaceName = null | |
$docBlock = null | |
$name = null | |
$flags = 0x00 | |
$extendedClass = null | |
$implementedInterfaces = [] | |
$properties = [] | |
$constants = [] | |
$methods = [] | |
$traitUsageGenerator | |
Protected Attributes inherited from AbstractGenerator | |
$isSourceDirty = true | |
$indentation = ' ' | |
$sourceContent = null | |
__construct | ( | $name = null , |
|
$namespaceName = null , |
|||
$flags = null , |
|||
$extends = null , |
|||
$interfaces = [] , |
|||
$properties = [] , |
|||
$methods = [] , |
|||
$docBlock = null |
|||
) |
string | $name | |
string | $namespaceName | |
array | string | $flags | |
string | $extends | |
array | $interfaces | |
array | $properties | |
array | $methods | |
DocBlockGenerator | $docBlock |
addConstant | ( | $name, | |
$value | |||
) |
Add Constant.
string | $name | non-empty string |
string | int | null | float | array | $value | scalar |
Exception\InvalidArgumentException |
addConstantFromGenerator | ( | PropertyGenerator | $constant | ) |
Add constant from PropertyGenerator.
PropertyGenerator | $constant |
Exception\InvalidArgumentException |
addConstants | ( | array | $constants | ) |
PropertyGenerator[]|array[] | $constants |
addFlag | ( | $flag | ) |
string | $flag |
addMethod | ( | $name, | |
array | $parameters = [] , |
||
$flags = MethodGenerator::FLAG_PUBLIC , |
|||
$body = null , |
|||
$docBlock = null |
|||
) |
Add Method from scalars.
string | $name | |
array | $parameters | |
int | $flags | |
string | $body | |
string | $docBlock |
Exception\InvalidArgumentException |
addMethodFromGenerator | ( | MethodGenerator | $method | ) |
Add Method from MethodGenerator.
MethodGenerator | $method |
Exception\InvalidArgumentException |
addMethods | ( | array | $methods | ) |
array | $methods |
addProperties | ( | array | $properties | ) |
array | $properties |
addProperty | ( | $name, | |
$defaultValue = null , |
|||
$flags = PropertyGenerator::FLAG_PUBLIC |
|||
) |
Add Property from scalars.
string | $name | |
string | array | $defaultValue | |
int | $flags |
Exception\InvalidArgumentException |
addPropertyFromGenerator | ( | PropertyGenerator | $property | ) |
Add property from PropertyGenerator.
PropertyGenerator | $property |
Exception\InvalidArgumentException |
addTrait | ( | $trait | ) |
addTraitAlias | ( | $method, | |
$alias, | |||
$visibility = null |
|||
) |
addTraitOverride | ( | $method, | |
$traitsToReplace | |||
) |
addTraits | ( | array | $traits | ) |
addUse | ( | $use, | |
$useAlias = null |
|||
) |
|
static |
Generate from array.
name string [required] Class Name filegenerator FileGenerator File generator that holds this class namespacename string The namespace for this class docblock string The docblock information flags int Flags, one of ClassGenerator::FLAG_ABSTRACT ClassGenerator::FLAG_FINAL extendedclass string Class which this class is extending implementedinterfaces properties methods
Exception\InvalidArgumentException |
array | $array |
|
static |
Build a Code Generation Php Object from a Class Reflection.
ClassReflection | $classReflection |
generate | ( | ) |
Implements GeneratorInterface.
getConstant | ( | $constantName | ) |
string | $constantName |
getConstants | ( | ) |
getContainingFileGenerator | ( | ) |
getDocBlock | ( | ) |
getExtendedClass | ( | ) |
getImplementedInterfaces | ( | ) |
getMethod | ( | $methodName | ) |
string | $methodName |
getMethods | ( | ) |
getName | ( | ) |
getNamespaceName | ( | ) |
getProperties | ( | ) |
getProperty | ( | $propertyName | ) |
string | $propertyName |
getTraitAliases | ( | ) |
getTraitOverrides | ( | ) |
getTraits | ( | ) |
getUses | ( | ) |
Returns the "use" classes.
hasConstant | ( | $constantName | ) |
string | $constantName |
hasMethod | ( | $methodName | ) |
string | $methodName |
hasProperty | ( | $propertyName | ) |
string | $propertyName |
hasTrait | ( | $traitName | ) |
isAbstract | ( | ) |
isFinal | ( | ) |
isSourceDirty | ( | ) |
removeFlag | ( | $flag | ) |
string | $flag |
removeMethod | ( | $methodName | ) |
string | $methodName |
removeTrait | ( | $traitName | ) |
removeTraitOverride | ( | $method, | |
$overridesToRemove = null |
|||
) |
setAbstract | ( | $isAbstract | ) |
bool | $isAbstract |
setContainingFileGenerator | ( | FileGenerator | $fileGenerator | ) |
FileGenerator | $fileGenerator |
setDocBlock | ( | DocBlockGenerator | $docBlock | ) |
DocBlockGenerator | $docBlock |
setExtendedClass | ( | $extendedClass | ) |
string | $extendedClass |
setFinal | ( | $isFinal | ) |
bool | $isFinal |
setFlags | ( | $flags | ) |
array | string | $flags |
setImplementedInterfaces | ( | array | $implementedInterfaces | ) |
array | $implementedInterfaces |
setName | ( | $name | ) |
string | $name |
setNamespaceName | ( | $namespaceName | ) |
string | $namespaceName |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const FLAG_ABSTRACT = 0x01 |
const FLAG_FINAL = 0x02 |
const IMPLEMENTS_KEYWORD = "implements" |
const OBJECT_TYPE = "class" |