Class ClassGenerator

Summary

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

Description

Methods

Name Description Defined By
__construct() ClassGenerator
addConstant() Add Constant ClassGenerator
addConstantFromGenerator() Add constant from PropertyGenerator ClassGenerator
addConstants() ClassGenerator
addFlag() ClassGenerator
addMethod() Add Method from scalars ClassGenerator
addMethodFromGenerator() Add Method from MethodGenerator ClassGenerator
addMethods() ClassGenerator
addProperties() ClassGenerator
addProperty() Add Property from scalars ClassGenerator
addPropertyFromGenerator() Add property from PropertyGenerator ClassGenerator
addTrait() ClassGenerator
addTraitAlias() ClassGenerator
addTraitOverride() ClassGenerator
addTraits() ClassGenerator
addUse() Add a class to "use" classes ClassGenerator
fromArray() Generate from array ClassGenerator
fromReflection() Build a Code Generation Php Object from a Class Reflection ClassGenerator
generate() ClassGenerator
getConstant() ClassGenerator
getConstants() ClassGenerator
getContainingFileGenerator() ClassGenerator
getDocBlock() ClassGenerator
getExtendedClass() ClassGenerator
getImplementedInterfaces() ClassGenerator
getIndentation() AbstractGenerator
getMethod() ClassGenerator
getMethods() ClassGenerator
getName() ClassGenerator
getNamespaceName() ClassGenerator
getProperties() ClassGenerator
getProperty() ClassGenerator
getSourceContent() AbstractGenerator
getTraitAliases() ClassGenerator
getTraitOverrides() ClassGenerator
getTraits() ClassGenerator
getUses() Returns the "use" classes ClassGenerator
hasConstant() ClassGenerator
hasExtentedClass() ClassGenerator
hasImplementedInterface() ClassGenerator
hasMethod() ClassGenerator
hasProperty() ClassGenerator
hasTrait() ClassGenerator
hasUse() ClassGenerator
hasUseAlias() ClassGenerator
isAbstract() ClassGenerator
isFinal() ClassGenerator
isSourceDirty() ClassGenerator
removeConstant() ClassGenerator
removeExtentedClass() ClassGenerator
removeFlag() ClassGenerator
removeImplementedInterface() ClassGenerator
removeMethod() ClassGenerator
removeProperty() ClassGenerator
removeTrait() ClassGenerator
removeTraitOverride() ClassGenerator
removeUse() ClassGenerator
removeUseAlias() ClassGenerator
setAbstract() ClassGenerator
setContainingFileGenerator() ClassGenerator
setDocBlock() ClassGenerator
setExtendedClass() ClassGenerator
setFinal() ClassGenerator
setFlags() ClassGenerator
setImplementedInterfaces() ClassGenerator
setIndentation() AbstractGenerator
setName() ClassGenerator
setNamespaceName() ClassGenerator
setOptions() AbstractGenerator
setSourceContent() AbstractGenerator
setSourceDirty() AbstractGenerator

Method Details

__construct()

Parameter Name Type Description
$name string
$namespaceName string
$flags array|string
$extends string
$interfaces array
$properties array
$methods array
$docBlock \DocBlockGenerator

Returns:

addConstant()

Add Constant

Parameter Name Type Description
$name string non-empty
$value string|int|null|float|array scalar

Returns: self

addConstantFromGenerator()

Add constant from PropertyGenerator

Parameter Name Type Description
$constant \PropertyGenerator

Returns: self

addConstants()

Parameter Name Type Description
$constants \PropertyGenerator[]|array[]

Returns: self

addFlag()

Parameter Name Type Description
$flag string

Returns: self

addMethod()

Add Method from scalars

Parameter Name Type Description
$name string
$parameters array
$flags int
$body string
$docBlock string

Returns: self

addMethodFromGenerator()

Add Method from MethodGenerator

Parameter Name Type Description
$method \MethodGenerator

Returns: self

addMethods()

Parameter Name Type Description
$methods array

Returns: self

addProperties()

Parameter Name Type Description
$properties array

Returns: self

addProperty()

Add Property from scalars

Parameter Name Type Description
$name string
$defaultValue string|array
$flags int

Returns: self

addPropertyFromGenerator()

Add property from PropertyGenerator

Parameter Name Type Description
$property \PropertyGenerator

Returns: self

addTrait()

Parameter Name Type Description
$trait

Returns:

addTraitAlias()

Parameter Name Type Description
$method
$alias
$visibility

Returns:

addTraitOverride()

Parameter Name Type Description
$method
$traitsToReplace

Returns:

addTraits()

Parameter Name Type Description
$traits

Returns:

addUse()

Add a class to "use" classes

Parameter Name Type Description
$use string
$useAlias string|null

Returns: self

fromArray()

Generate from array

Parameter Name Type Description
$array array

Returns: self

fromReflection()

Build a Code Generation Php Object from a Class Reflection

Parameter Name Type Description
$classReflection \ClassReflection

Returns: self

generate()

Returns:

getConstant()

Parameter Name Type Description
$constantName string

Returns: \PropertyGenerator|bool

getConstants()

Returns: \PropertyGenerator[] indexed by constant name

getContainingFileGenerator()

Returns: \FileGenerator

getDocBlock()

Returns: \DocBlockGenerator

getExtendedClass()

Returns: string

getImplementedInterfaces()

Returns: array

getIndentation()

Returns: string

getMethod()

Parameter Name Type Description
$methodName string

Returns: \MethodGenerator|bool

getMethods()

Returns: \MethodGenerator[]

getName()

Returns: string

getNamespaceName()

Returns: string

getProperties()

Returns: \PropertyGenerator[]

getProperty()

Parameter Name Type Description
$propertyName string

Returns: \PropertyGenerator|bool

getSourceContent()

Returns: string

getTraitAliases()

Returns:

getTraitOverrides()

Returns:

getTraits()

Returns:

getUses()

Returns the "use" classes

Returns: array

hasConstant()

Parameter Name Type Description
$constantName string

Returns: bool

hasExtentedClass()

Returns: bool

hasImplementedInterface()

Parameter Name Type Description
$implementedInterface string

Returns: bool

hasMethod()

Parameter Name Type Description
$methodName string

Returns: bool

hasProperty()

Parameter Name Type Description
$propertyName string

Returns: bool

hasTrait()

Parameter Name Type Description
$traitName

Returns:

hasUse()

Parameter Name Type Description
$use string

Returns: self

hasUseAlias()

Parameter Name Type Description
$use string

Returns: bool

isAbstract()

Returns: bool

isFinal()

Returns: bool

isSourceDirty()

Returns: bool

removeConstant()

Parameter Name Type Description
$constantName string

Returns: self

removeExtentedClass()

Returns: self

removeFlag()

Parameter Name Type Description
$flag string

Returns: self

removeImplementedInterface()

Parameter Name Type Description
$implementedInterface
$implementedInterface

Returns: self

removeMethod()

Parameter Name Type Description
$methodName string

Returns: self

removeProperty()

Parameter Name Type Description
$propertyName string

Returns: self

removeTrait()

Parameter Name Type Description
$traitName

Returns:

removeTraitOverride()

Parameter Name Type Description
$method
$overridesToRemove

Returns:

removeUse()

Parameter Name Type Description
$use string

Returns: self

removeUseAlias()

Parameter Name Type Description
$use
$use

Returns: self

setAbstract()

Parameter Name Type Description
$isAbstract bool

Returns: self

setContainingFileGenerator()

Parameter Name Type Description
$fileGenerator \FileGenerator

Returns: self

setDocBlock()

Parameter Name Type Description
$docBlock \DocBlockGenerator

Returns: self

setExtendedClass()

Parameter Name Type Description
$extendedClass string

Returns: self

setFinal()

Parameter Name Type Description
$isFinal bool

Returns: self

setFlags()

Parameter Name Type Description
$flags array|string

Returns: self

setImplementedInterfaces()

Parameter Name Type Description
$implementedInterfaces array

Returns: self

setIndentation()

Parameter Name Type Description
$indentation string

Returns: \AbstractGenerator

setName()

Parameter Name Type Description
$name string

Returns: self

setNamespaceName()

Parameter Name Type Description
$namespaceName string

Returns: self

setOptions()

Parameter Name Type Description
$options array|\Traversable

Returns: \AbstractGenerator

setSourceContent()

Parameter Name Type Description
$sourceContent string

Returns: \AbstractGenerator

setSourceDirty()

Parameter Name Type Description
$isSourceDirty bool

Returns: \AbstractGenerator

Top