803. Class

803.1. Zend\Code\Generator\ClassGenerator

803.1.1. Methods

803.1.1.1. fromReflection

fromReflection()

Build a Code Generation Php Object from a Class Reflection

Parameters:ClassReflection
Return type:ClassGenerator

803.1.1.2. fromArray

fromArray()

Generate from array

Parameters:array
Return type:ClassGenerator

803.1.1.3. __construct

__construct()

@param string $name

Parameters:
  • string
  • array|string
  • string
  • array
  • array
  • array
  • DocBlockGenerator

803.1.1.4. setName

setName()

@param string $name

Return type:ClassGenerator

803.1.1.5. getName

getName()

@return string

803.1.1.6. setNamespaceName

setNamespaceName()

@param string $namespaceName

Return type:ClassGenerator

803.1.1.7. getNamespaceName

getNamespaceName()

@return string

803.1.1.8. setContainingFileGenerator

setContainingFileGenerator()

@param FileGenerator $fileGenerator

Return type:ClassGenerator

803.1.1.9. getContainingFileGenerator

getContainingFileGenerator()

@return FileGenerator

803.1.1.10. setDocBlock

setDocBlock()

@param DocBlockGenerator $docBlock

Return type:ClassGenerator

803.1.1.11. getDocBlock

getDocBlock()

@return DocBlockGenerator

803.1.1.12. setFlags

setFlags()

@param array|string $flags

Return type:ClassGenerator

803.1.1.13. addFlag

addFlag()

@param string $flag

Return type:ClassGenerator

803.1.1.14. removeFlag

removeFlag()

@param string $flag

Return type:ClassGenerator

803.1.1.15. setAbstract

setAbstract()

@param bool $isAbstract

Return type:ClassGenerator

803.1.1.16. isAbstract

isAbstract()

@return bool

803.1.1.17. setFinal

setFinal()

@param bool $isFinal

Return type:ClassGenerator

803.1.1.18. isFinal

isFinal()

@return bool

803.1.1.19. setExtendedClass

setExtendedClass()

@param string $extendedClass

Return type:ClassGenerator

803.1.1.20. getExtendedClass

getExtendedClass()

@return string

803.1.1.21. setImplementedInterfaces

setImplementedInterfaces()

@param array $implementedInterfaces

Return type:ClassGenerator

803.1.1.22. getImplementedInterfaces

getImplementedInterfaces()

@return array

803.1.1.23. addProperties

addProperties()

@param array $properties

Return type:ClassGenerator

803.1.1.24. addProperty

addProperty()

Add Property from scalars

Parameters:
  • string
  • string|array
  • int
Throws ExceptionInvalidArgumentException:
 
Return type:

ClassGenerator

803.1.1.25. addPropertyFromGenerator

addPropertyFromGenerator()

Add property from PropertyGenerator

Parameters:string|PropertyGenerator
Throws ExceptionInvalidArgumentException:
 
Return type:ClassGenerator

803.1.1.26. addUse

addUse()

Add a class to “use” classes

Parameters:string

803.1.1.27. getProperties

getProperties()

@return PropertyGenerator[]

803.1.1.28. getProperty

getProperty()

@param string $propertyName

Return type:PropertyGenerator|false

803.1.1.29. getUses

getUses()

Returns the “use” classes

Return type:array

803.1.1.30. hasProperty

hasProperty()

@param string $propertyName

Return type:bool

803.1.1.31. addMethods

addMethods()

@param array $methods

Return type:ClassGenerator

803.1.1.32. addMethod

addMethod()

Add Method from scalars

Parameters:
  • string
  • array
  • int
  • string
  • string
Throws ExceptionInvalidArgumentException:
 
Return type:

ClassGenerator

803.1.1.33. addMethodFromGenerator

addMethodFromGenerator()

Add Method from MethodGenerator

Parameters:MethodGenerator
Throws ExceptionInvalidArgumentException:
 
Return type:ClassGenerator

803.1.1.34. getMethods

getMethods()

@return MethodGenerator[]

803.1.1.35. getMethod

getMethod()

@param string $methodName

Return type:MethodGenerator|false

803.1.1.36. hasMethod

hasMethod()

@param string $methodName

Return type:bool

803.1.1.37. isSourceDirty

isSourceDirty()

@return bool

803.1.1.38. generate

generate()

@return string

803.1.2. Constants

803.1.2.1. FLAG_ABSTRACT

803.1.2.2. FLAG_FINAL