Methods
__construct()
__construct(string $name, string $namespaceName, array | string $flags, string $extends, array $interfaces, array $properties, array $methods, \Zend\Code\Generator\DocBlockGenerator $docBlock)
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::__construct() |
Parameters
$name
string
$namespaceName
string
$flags
arraystring
$extends
string
$interfaces
array
$properties
array
$methods
array
Add Constant
addConstant(string $name, string $value) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::addConstant() |
Parameters
$name
string
$value
string
Exceptions
Returns
Add constant from PropertyGenerator
addConstantFromGenerator(\Zend\Code\Generator\PropertyGenerator $constant) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::addConstantFromGenerator() |
Parameters
Exceptions
Returns
addConstants()
addConstants(array $constants) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::addConstants() |
Parameters
Returns
addFlag()
addFlag(string $flag) : \Zend\Code\Generator\self
Parameters
$flag
string
Returns
\Zend\Code\Generator\self
Add Method from scalars
addMethod(string $name, array $parameters, int $flags, string $body, string $docBlock) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::addMethod() |
Parameters
$name
string
$parameters
array
$flags
int
$body
string
$docBlock
string
Exceptions
Returns
Add Method from MethodGenerator
addMethodFromGenerator(\Zend\Code\Generator\MethodGenerator $method) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::addMethodFromGenerator() |
Parameters
Exceptions
Returns
addMethods()
addMethods(array $methods) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::addMethods() |
Parameters
$methods
array
Returns
addProperties()
addProperties(array $properties) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::addProperties() |
Parameters
$properties
array
Returns
Add Property from scalars
addProperty(string $name, string | array $defaultValue, int $flags) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::addProperty() |
Parameters
$name
string
$defaultValue
stringarray
$flags
int
Exceptions
Returns
Add property from PropertyGenerator
addPropertyFromGenerator(\Zend\Code\Generator\PropertyGenerator $property) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::addPropertyFromGenerator() |
Parameters
Exceptions
Returns
addTrait()
addTrait($trait)
Inherited
inherit |
Zend\Code\Generator\TraitUsageInterface |
inherited_from |
\Zend\Code\Generator\ClassGenerator::addTrait() |
Parameters
$trait
addTraitAlias()
addTraitAlias($method, $alias, $visibility)
Inherited
inherit |
Zend\Code\Generator\TraitUsageInterface |
inherited_from |
\Zend\Code\Generator\ClassGenerator::addTraitAlias() |
Parameters
$method
$alias
$visibility
addTraitOverride()
addTraitOverride($method, $traitsToReplace)
Inherited
inherit |
Zend\Code\Generator\TraitUsageInterface |
inherited_from |
\Zend\Code\Generator\ClassGenerator::addTraitOverride() |
Parameters
$method
$traitsToReplace
addTraits()
addTraits(array $traits)
Inherited
inherit |
Zend\Code\Generator\TraitUsageInterface |
inherited_from |
\Zend\Code\Generator\ClassGenerator::addTraits() |
Parameters
$traits
Add a class to "use" classes
addUse(string $use, string | null $useAlias) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::addUse() |
Parameters
$use
string
$useAlias
stringnull
Returns
Generate from array
fromArray(array $array) : \Zend\Code\Generator\TraitGenerator
configkey |
name string [required] Class Name |
configkey |
filegenerator FileGenerator File generator that holds this class |
configkey |
namespacename string The namespace for this class |
configkey |
docblock string The docblock information |
configkey |
properties |
configkey |
methods |
Parameters
$array
array
Exceptions
Returns
generate()
generate()
Inherited
inherit |
Zend\Code\Generator\GeneratorInterface |
inherited_from |
\Zend\Code\Generator\ClassGenerator::generate() |
getConstant()
getConstant(string $constantName) : \Zend\Code\Generator\PropertyGenerator | false
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::getConstant() |
Parameters
$constantName
string
Returns
getContainingFileGenerator()
getContainingFileGenerator() : \Zend\Code\Generator\FileGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::getContainingFileGenerator() |
Returns
getExtendedClass()
getExtendedClass() : string
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::getExtendedClass() |
Returns
string
getImplementedInterfaces()
getImplementedInterfaces() : array
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::getImplementedInterfaces() |
Returns
array
getIndentation()
getIndentation() : string
Inherited
inherited_from |
\Zend\Code\Generator\AbstractGenerator::getIndentation() |
inherited_from |
\Zend\Code\Generator\ClassGenerator::getIndentation() |
Returns
string
getMethod()
getMethod(string $methodName) : \Zend\Code\Generator\MethodGenerator | false
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::getMethod() |
Parameters
$methodName
string
Returns
getName()
getName() : string
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::getName() |
Returns
string
getNamespaceName()
getNamespaceName() : string
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::getNamespaceName() |
Returns
string
getProperty()
getProperty(string $propertyName) : \Zend\Code\Generator\PropertyGenerator | false
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::getProperty() |
Parameters
$propertyName
string
Returns
getSourceContent()
getSourceContent() : string
Inherited
inherited_from |
\Zend\Code\Generator\AbstractGenerator::getSourceContent() |
inherited_from |
\Zend\Code\Generator\ClassGenerator::getSourceContent() |
Returns
string
getTraitAliases()
getTraitAliases()
Inherited
inherit |
Zend\Code\Generator\TraitUsageInterface |
inherited_from |
\Zend\Code\Generator\ClassGenerator::getTraitAliases() |
getTraitOverrides()
getTraitOverrides()
Inherited
inherit |
Zend\Code\Generator\TraitUsageInterface |
inherited_from |
\Zend\Code\Generator\ClassGenerator::getTraitOverrides() |
getTraits()
getTraits()
Inherited
inherit |
Zend\Code\Generator\TraitUsageInterface |
inherited_from |
\Zend\Code\Generator\ClassGenerator::getTraits() |
Returns the "use" classes
getUses() : array
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::getUses() |
Returns
array
hasConstant()
hasConstant(string $constantName) : bool
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::hasConstant() |
Parameters
$constantName
string
Returns
bool
hasMethod()
hasMethod(string $methodName) : bool
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::hasMethod() |
Parameters
$methodName
string
Returns
bool
hasProperty()
hasProperty(string $propertyName) : bool
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::hasProperty() |
Parameters
$propertyName
string
Returns
bool
hasTrait()
hasTrait($traitName)
Inherited
inherit |
Zend\Code\Generator\TraitUsageInterface |
inherited_from |
\Zend\Code\Generator\ClassGenerator::hasTrait() |
Parameters
$traitName
isAbstract()
isAbstract() : bool
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::isAbstract() |
Returns
bool
isFinal()
isFinal() : bool
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::isFinal() |
Returns
bool
isSourceDirty()
isSourceDirty() : bool
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::isSourceDirty() |
Returns
bool
removeFlag()
removeFlag(string $flag) : \Zend\Code\Generator\self
Parameters
$flag
string
Returns
\Zend\Code\Generator\self
removeMethod()
removeMethod(string $methodName) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::removeMethod() |
Parameters
$methodName
string
Returns
removeTrait()
removeTrait($traitName)
Inherited
inherit |
Zend\Code\Generator\TraitUsageInterface |
inherited_from |
\Zend\Code\Generator\ClassGenerator::removeTrait() |
Parameters
$traitName
removeTraitOverride()
removeTraitOverride($method, $overridesToRemove)
Inherited
inherit |
Zend\Code\Generator\TraitUsageInterface |
inherited_from |
\Zend\Code\Generator\ClassGenerator::removeTraitOverride() |
Parameters
$method
$overridesToRemove
setAbstract()
setAbstract(bool $isAbstract) : \Zend\Code\Generator\self
Parameters
$isAbstract
bool
Returns
\Zend\Code\Generator\self
setContainingFileGenerator()
setContainingFileGenerator(\Zend\Code\Generator\FileGenerator $fileGenerator) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::setContainingFileGenerator() |
Parameters
Returns
setDocBlock()
setDocBlock(\Zend\Code\Generator\DocBlockGenerator $docBlock) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::setDocBlock() |
Parameters
Returns
setExtendedClass()
setExtendedClass(string $extendedClass) : \Zend\Code\Generator\self
Parameters
$extendedClass
string
Returns
\Zend\Code\Generator\self
setFinal()
setFinal(bool $isFinal) : \Zend\Code\Generator\self
Parameters
$isFinal
bool
Returns
\Zend\Code\Generator\self
setFlags()
setFlags(array | string $flags) : \Zend\Code\Generator\self
Parameters
$flags
arraystring
Returns
\Zend\Code\Generator\self
setImplementedInterfaces()
setImplementedInterfaces(array $implementedInterfaces) : \Zend\Code\Generator\self
Parameters
$implementedInterfaces
array
Returns
\Zend\Code\Generator\self
setIndentation()
setIndentation(string $indentation) : \Zend\Code\Generator\AbstractGenerator
Inherited
inherited_from |
\Zend\Code\Generator\AbstractGenerator::setIndentation() |
inherited_from |
\Zend\Code\Generator\ClassGenerator::setIndentation() |
Parameters
$indentation
string
Returns
setNamespaceName()
setNamespaceName(string $namespaceName) : \Zend\Code\Generator\ClassGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::setNamespaceName() |
Parameters
$namespaceName
string
Returns
setOptions()
setOptions(array | \Traversable $options) : \Zend\Code\Generator\AbstractGenerator
Inherited
inherited_from |
\Zend\Code\Generator\AbstractGenerator::setOptions() |
inherited_from |
\Zend\Code\Generator\ClassGenerator::setOptions() |
Parameters
$options
array\Traversable
Exceptions
Returns
setSourceContent()
setSourceContent(string $sourceContent) : \Zend\Code\Generator\AbstractGenerator
Inherited
inherited_from |
\Zend\Code\Generator\AbstractGenerator::setSourceContent() |
inherited_from |
\Zend\Code\Generator\ClassGenerator::setSourceContent() |
Parameters
$sourceContent
string
Returns
setSourceDirty()
setSourceDirty(bool $isSourceDirty) : \Zend\Code\Generator\AbstractGenerator
Inherited
inherited_from |
\Zend\Code\Generator\AbstractGenerator::setSourceDirty() |
inherited_from |
\Zend\Code\Generator\ClassGenerator::setSourceDirty() |
Parameters
$isSourceDirty
bool
Returns
Properties
$containingFileGenerator
$containingFileGenerator : \Zend\Code\Generator\FileGenerator
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::$$containingFileGenerator |
$extendedClass
$extendedClass : string
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::$$extendedClass |
$flags
$flags : bool
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::$$flags |
<p>Array of string names</p>
$implementedInterfaces : array
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::$$implementedInterfaces |
<p>4 spaces by default</p>
$indentation : int | string
Inherited
inherited_from |
\Zend\Code\Generator\AbstractGenerator::$$indentation |
inherited_from |
\Zend\Code\Generator\ClassGenerator::$$indentation |
$isSourceDirty
$isSourceDirty : bool
Inherited
inherited_from |
\Zend\Code\Generator\AbstractGenerator::$$isSourceDirty |
inherited_from |
\Zend\Code\Generator\ClassGenerator::$$isSourceDirty |
$name
$name : string
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::$$name |
$namespaceName
$namespaceName : string
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::$$namespaceName |
$sourceContent
$sourceContent : string
Inherited
inherited_from |
\Zend\Code\Generator\AbstractGenerator::$$sourceContent |
inherited_from |
\Zend\Code\Generator\ClassGenerator::$$sourceContent |
Constants
FLAG_ABSTRACT
FLAG_ABSTRACT
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::FLAG_ABSTRACT |
FLAG_FINAL
FLAG_FINAL
Inherited
inherited_from |
\Zend\Code\Generator\ClassGenerator::FLAG_FINAL |
Line feed to use in place of EOL
LINE_FEED
Inherited
inherited_from |
\Zend\Code\Generator\AbstractGenerator::LINE_FEED |
inherited_from |
\Zend\Code\Generator\ClassGenerator::LINE_FEED |