메소드 |
설명 |
|
__construct ( string $namespace, string $name, string $shortName = null ) |
ClassDefinition |
|
addConstant ( zephir\ClassConstant $constant ) |
Adds a constant to the definition |
|
addInitMethod ( zephir\StatementsBlock $statementsBlock ) |
Creates the initialization method |
|
addMethod ( ClassMethod $method, array $statement = null ) : void |
Adds a method to the class definition |
|
addProperty ( ClassProperty $property ) |
Adds a property to the definition |
|
addStaticInitMethod ( zephir\StatementsBlock $statementsBlock ) |
Creates the static initialization method |
|
buildFromReflection ( ReflectionClass $class ) : ClassDefinition |
Builds a class definition from reflection |
|
checkInterfaceImplements ( ClassDefinition $classDefinition, ClassDefinition $interfaceDefinition ) |
Checks if a class implements an interface |
|
compile ( zephir\CompilationContext $compilationContext ) |
Compiles a class/interface |
|
getAliasManager ( ) : zephir\AliasManager |
|
|
getCNamespace ( ) : string |
Returns a valid namespace to be used in C-sources |
|
getClassEntry ( zephir\CompilationContext $compilationContext = null ) : string |
Returns the name of the zend_class_entry according to the class name |
|
getClassEntryByClassName ( string $className, zephir\CompilationContext $compilationContext, boolean $check = true ) : string |
Convert Class/Interface name to C ClassEntry |
|
getCompleteName ( ) : string |
Returns the class name including its namespace |
|
getConstant ( string $constantName ) : boolean | zephir\ClassConstant |
Returns a constant definition by its name |
|
getConstants ( ) : zephir\ClassConstant[] |
Returns all constants defined in the class |
|
getDependencies ( ) |
Calculate the dependency rank of the class based on its dependencies |
|
getDependencyRank ( ) : integer |
Returns the dependency rank for this class |
|
getDocBlock ( ) : array |
Returns the class/interface docBlock |
|
getEventsManager ( ) : zephir\EventsManager |
Get eventsManager for class definition |
|
getExtendsClass ( ) : string |
Returns the extended class |
|
getExtendsClassDefinition ( ) : ClassDefinition |
Returns the class definition related to the extended class |
|
getExternalHeader ( ) : string |
Returns an absolute location to the class header |
|
getImplementedInterfaceDefinitions ( ) : ClassDefinition[] |
Returns the class definition for the implemented interfaces |
|
getImplementedInterfaces ( ) : array |
Returns the implemented interfaces |
|
getInitMethod ( ) : ClassMethod |
Returns the initialization method if any does exist |
|
getLocalOrParentInitMethod ( ) : ClassMethod |
Returns the initialization method if any does exist |
|
getMethod ( $methodName, boolean | true $checkExtends = true ) : boolean | ClassMethod |
Returns a method by its name |
|
getMethods ( ) : ClassMethod[] |
Returns all methods defined in the class |
|
getNCNamespace ( ) : string |
Returns a valid namespace to be used in C-sources |
|
getName ( ) : string |
Returns the class name |
|
getNamespace ( ) : string |
Return the class namespace |
|
getParsedDocBlock ( ) : DocBlock |
Returns the parsed docBlock |
|
getPossibleMethodName ( string $methodName ) : string | boolean |
Tries to find the most similar name |
|
getProperties ( ) : ClassProperty[] |
Returns all properties defined in the class |
|
getProperty ( $propertyName ) : boolean | ClassProperty |
Returns a method definition by its name |
|
getSCName ( string $namespace ) : string |
Class name without namespace prefix for class registration |
|
getShortName ( ) : string |
Returns the class name without namespace |
|
getStaticInitMethod ( ) : ClassMethod |
Returns the initialization method if any does exist |
|
getType ( ) : string |
Returns the class type |
|
hasConstant ( string $name ) : boolean |
Checks if class definition has a property |
|
hasMethod ( $methodName ) : boolean |
Checks if the class implements an specific name |
|
hasProperty ( string $name ) : boolean |
Checks if a class definition has a property |
|
increaseDependencyRank ( integer $rank ) |
A class definition calls this method to mark this class as a dependency of another |
|
isAbstract ( ) : boolean |
Checks whether the class is abstract or not |
|
isBundled ( ) : boolean |
Returns whether the class is bundled or not |
|
isExternal ( ) : boolean |
Returns whether the class is internal or not |
|
isFinal ( ) : boolean |
Checks whether the class is abstract or not |
|
isGeneratedConstructor ( ) : boolean |
Returns whether the constructor was generated by zephir |
|
isInterface ( ) : boolean |
Check if the class definition correspond to an interface |
|
preCompile ( zephir\CompilationContext $compilationContext ) |
Pre-compiles a class/interface gathering method information required by other methods |
|
setAliasManager ( zephir\AliasManager $aliasManager ) |
|
|
setDocBlock ( array $docBlock ) |
Sets the class/interface docBlock |
|
setExtendsClass ( string $extendsClass ) |
Sets the extended class |
|
setExtendsClassDefinition ( $classDefinition ) |
Sets the class definition for the extended class |
|
setImplementedInterfaceDefinitions ( array $implementedInterfaceDefinitions ) |
Sets the class definition for the implemented interfaces |
|
setImplementsInterfaces ( array $implementedInterfaces ) |
Sets the implemented interfaces |
|
setIsAbstract ( boolean $abstract ) |
Sets if the class is final |
|
setIsBundled ( boolean $isBundled ) |
Sets if the class is internal or not |
|
setIsExternal ( boolean $isExternal ) |
Sets whether the class is external or not |
|
setIsFinal ( boolean $final ) |
Sets if the class is final |
|
setIsGeneratedConstructor ( boolean $isGeneratedConstructor ) |
Sets if the class constructor was generated by zephir |
|
setMethod ( $methodName, ClassMethod $method ) |
Set a method and its body |
|
setMethods ( array $methods ) |
Sets class methods externally |
|
setOriginalNode ( array $originalNode ) |
Set the original node where the class was declared |
|
setType ( string $type ) |
Set the class' type (class/interface) |
|
updateMethod ( ClassMethod $method, array $statement = null ) : void |
Updates an existing method definition |
|