Property | Type | Description | |
---|---|---|---|
$constants | Array of constants | ||
$containingFileGenerator | Zend\Code\Generator\FileGenerator | ||
$docBlock | Zend\Code\Generator\DocBlockGenerator | ||
$extendedClass | string | ||
$flags | boolean | ||
$implementedInterfaces | Array of string names | ||
$methods | Array of methods | ||
$name | string | ||
$namespaceName | string | ||
$properties | Array of properties | ||
$traitUsageGenerator | Object to encapsulate trait usage logic |
Method | Description | |
---|---|---|
__construct ( string $name = null, string $namespaceName = null, array | string $flags = null, string $extends = null, array $interfaces = [], array $properties = [], array $methods = [], Zend\Code\Generator\DocBlockGenerator $docBlock = null ) | ||
addConstant ( string $name, string | integer | null | float | array $value ) : self | Add Constant | |
addConstantFromGenerator ( Zend\Code\Generator\PropertyGenerator $constant ) : self | Add constant from PropertyGenerator | |
addConstants ( array $constants ) : self | ||
addFlag ( string $flag ) : self | ||
addMethod ( string $name, array $parameters = [], integer $flags = MethodGenerator::FLAG_PUBLIC, string $body = null, string $docBlock = null ) : self | Add Method from scalars | |
addMethodFromGenerator ( |
Add Method from MethodGenerator | |
addMethods ( array $methods ) : self | ||
addProperties ( array $properties ) : self | ||
addProperty ( string $name, string | array $defaultValue = null, integer $flags = PropertyGenerator::FLAG_PUBLIC ) : self | Add Property from scalars | |
addPropertyFromGenerator ( Zend\Code\Generator\PropertyGenerator $property ) : self | Add property from PropertyGenerator | |
addTrait ( $trait ) | ||
addTraitAlias ( $method, $alias, $visibility = null ) | ||
addTraitOverride ( $method, $traitsToReplace ) | ||
addTraits ( array $traits ) | ||
addUse ( string $use, string | null $useAlias = null ) : self | Add a class to "use" classes | |
fromArray ( array $array ) : self | Generate from array | |
fromReflection ( Zend\Code\Reflection\ClassReflection $classReflection ) : self | Build a Code Generation Php Object from a Class Reflection | |
generate ( ) | ||
getConstant ( string $constantName ) : Zend\Code\Generator\PropertyGenerator | false | ||
getConstants ( ) : Zend\Code\Generator\PropertyGenerator[] | ||
getContainingFileGenerator ( ) : Zend\Code\Generator\FileGenerator | ||
getDocBlock ( ) : Zend\Code\Generator\DocBlockGenerator | ||
getExtendedClass ( ) : string | ||
getImplementedInterfaces ( ) : array | ||
getMethod ( string $methodName ) : |
||
getMethods ( ) : |
||
getName ( ) : string | ||
getNamespaceName ( ) : string | ||
getProperties ( ) : Zend\Code\Generator\PropertyGenerator[] | ||
getProperty ( string $propertyName ) : Zend\Code\Generator\PropertyGenerator | false | ||
getTraitAliases ( ) | ||
getTraitOverrides ( ) | ||
getTraits ( ) | ||
getUses ( ) : array | Returns the "use" classes | |
hasConstant ( string $constantName ) : boolean | ||
hasExtentedClass ( ) : boolean | ||
hasImplementedInterface ( string $implementedInterface ) : boolean | ||
hasMethod ( string $methodName ) : boolean | ||
hasProperty ( string $propertyName ) : boolean | ||
hasTrait ( $traitName ) | ||
hasUse ( string $use ) : self | ||
hasUseAlias ( string $use ) : boolean | ||
isAbstract ( ) : boolean | ||
isFinal ( ) : boolean | ||
isSourceDirty ( ) : boolean | ||
removeConstant ( string $constantName ) : self | ||
removeExtentedClass ( ) : self | ||
removeFlag ( string $flag ) : self | ||
removeImplementedInterface ( $implementedInterface ) : self | ||
removeMethod ( string $methodName ) : self | ||
removeProperty ( string $propertyName ) : self | ||
removeTrait ( $traitName ) | ||
removeTraitOverride ( $method, $overridesToRemove = null ) | ||
removeUse ( string $use ) : self | ||
removeUseAlias ( $use ) : self | ||
setAbstract ( boolean $isAbstract ) : self | ||
setContainingFileGenerator ( Zend\Code\Generator\FileGenerator $fileGenerator ) : self | ||
setDocBlock ( Zend\Code\Generator\DocBlockGenerator $docBlock ) : self | ||
setExtendedClass ( string $extendedClass ) : self | ||
setFinal ( boolean $isFinal ) : self | ||
setFlags ( array | string $flags ) : self | ||
setImplementedInterfaces ( array $implementedInterfaces ) : self | ||
setName ( string $name ) : self | ||
setNamespaceName ( string $namespaceName ) : self |
Method | Description | |
---|---|---|
generateShortOrCompleteClassname ( string $fqnClassName ) : string | ||
validateConstantValue ( mixed $value ) : void |
public __construct ( string $name = null, string $namespaceName = null, array | string $flags = null, string $extends = null, array $interfaces = [], array $properties = [], array $methods = [], Zend\Code\Generator\DocBlockGenerator $docBlock = null ) | ||
$name | string | |
$namespaceName | string | |
$flags | array | string | |
$extends | string | |
$interfaces | array | |
$properties | array | |
$methods | array | |
$docBlock | Zend\Code\Generator\DocBlockGenerator |
public addConstantFromGenerator ( Zend\Code\Generator\PropertyGenerator $constant ) : self | ||
$constant | Zend\Code\Generator\PropertyGenerator | |
return | self |
public addConstants ( array $constants ) : self | ||
$constants | array | |
return | self |
public addMethodFromGenerator ( |
||
$method | ||
return | self |
public addProperties ( array $properties ) : self | ||
$properties | array | |
return | self |
public addPropertyFromGenerator ( Zend\Code\Generator\PropertyGenerator $property ) : self | ||
$property | Zend\Code\Generator\PropertyGenerator | |
return | self |
public static fromReflection ( Zend\Code\Reflection\ClassReflection $classReflection ) : self | ||
$classReflection | Zend\Code\Reflection\ClassReflection | |
return | self |
public getConstant ( string $constantName ) : Zend\Code\Generator\PropertyGenerator | false | ||
$constantName | string | |
return | Zend\Code\Generator\PropertyGenerator | false |
public getConstants ( ) : Zend\Code\Generator\PropertyGenerator[] | ||
return | Zend\Code\Generator\PropertyGenerator[] | indexed by constant name |
public getContainingFileGenerator ( ) : Zend\Code\Generator\FileGenerator | ||
return | Zend\Code\Generator\FileGenerator |
public getDocBlock ( ) : Zend\Code\Generator\DocBlockGenerator | ||
return | Zend\Code\Generator\DocBlockGenerator |
public getProperties ( ) : Zend\Code\Generator\PropertyGenerator[] | ||
return | Zend\Code\Generator\PropertyGenerator[] |
public getProperty ( string $propertyName ) : Zend\Code\Generator\PropertyGenerator | false | ||
$propertyName | string | |
return | Zend\Code\Generator\PropertyGenerator | false |
public hasConstant ( string $constantName ) : boolean | ||
$constantName | string | |
return | boolean |
public hasImplementedInterface ( string $implementedInterface ) : boolean | ||
$implementedInterface | string | |
return | boolean |
public hasProperty ( string $propertyName ) : boolean | ||
$propertyName | string | |
return | boolean |
public removeConstant ( string $constantName ) : self | ||
$constantName | string | |
return | self |
public removeImplementedInterface ( $implementedInterface ) : self | ||
$implementedInterface | ||
return | self |
public removeMethod ( string $methodName ) : self | ||
$methodName | string | |
return | self |
public removeProperty ( string $propertyName ) : self | ||
$propertyName | string | |
return | self |
public removeTraitOverride ( $method, $overridesToRemove = null ) |
public setAbstract ( boolean $isAbstract ) : self | ||
$isAbstract | boolean | |
return | self |
public setContainingFileGenerator ( Zend\Code\Generator\FileGenerator $fileGenerator ) : self | ||
$fileGenerator | Zend\Code\Generator\FileGenerator | |
return | self |
public setDocBlock ( Zend\Code\Generator\DocBlockGenerator $docBlock ) : self | ||
$docBlock | Zend\Code\Generator\DocBlockGenerator | |
return | self |
public setExtendedClass ( string $extendedClass ) : self | ||
$extendedClass | string | |
return | self |
public setImplementedInterfaces ( array $implementedInterfaces ) : self | ||
$implementedInterfaces | array | |
return | self |
public setNamespaceName ( string $namespaceName ) : self | ||
$namespaceName | string | |
return | self |
protected FileGenerator,Zend\Code\Generator $containingFileGenerator | ||
return | Zend\Code\Generator\FileGenerator |
protected DocBlockGenerator,Zend\Code\Generator $docBlock | ||
return | Zend\Code\Generator\DocBlockGenerator |