PHP 클래스 Phan\Language\Element\Clazz

상속: extends AddressableElement, use trait Phan\Memoize
파일 보기 프로젝트 열기: etsy/phan 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Context $context, string $name, UnionType $type, integer $flags, FullyQualifiedClassName $fqsen, Type $parent_type = null, array $interface_fqsen_list = [], array $trait_fqsen_list = [] )
__toString ( ) : string
addConstant ( CodeBase $code_base, ClassConstant $constant ) : null; Add a class constant
addInterfaceClassFQSEN ( Phan\Language\FQSEN $fqsen ) : null
addMethod ( CodeBase $code_base, Method $method, Option | Phan\Library\None $type_option ) : null Add a method to this class
addProperty ( CodeBase $code_base, Property $property, Option | Phan\Library\None $type_option ) : void Add a property to this class
addTraitFQSEN ( Phan\Language\FQSEN $fqsen ) : null
analyze ( CodeBase $code_base ) : void This method should be called after hydration
fromClassName ( CodeBase $code_base, string $class_name ) : Clazz
fromReflectionClass ( CodeBase $code_base, ReflectionClass $class ) : Clazz
getAncestorClassList ( CodeBase $code_base ) : Clazz[]
getAncestorFQSENList ( CodeBase $code_base ) : FullyQualifiedClassName[]
getCallMethod ( CodeBase $code_base ) : Method
getCallStaticMethod ( CodeBase $code_base ) : Method
getConstantMap ( CodeBase $code_base ) : array
getConstantWithName ( CodeBase $code_base, string $name ) : ClassConstant
getFQSEN ( ) : FullyQualifiedClassName
getHasDynamicProperties ( CodeBase $code_base ) : boolean
getHierarchyDepth ( CodeBase $code_base ) : integer
getHierarchyRootFQSEN ( CodeBase $code_base ) : FullyQualifiedClassName
getInterfaceFQSENList ( ) : array
getIsParentConstructorCalled ( ) : boolean
getMethodByName ( CodeBase $code_base, string $name ) : Method
getMethodByNameInContext ( CodeBase $code_base, string $name, Context $context ) : Method
getMethodMap ( CodeBase $code_base ) : array
getNonParentAncestorFQSENList ( CodeBase $code_base ) : FullyQualifiedClassName[]
getOverridableAncestorClassList ( CodeBase $code_base ) : Clazz[]
getOverridableAncestorFQSENList ( CodeBase $code_base ) : FullyQualifiedClassName[]
getParentClass ( CodeBase $code_base ) : Clazz
getParentClassFQSEN ( ) : FullyQualifiedClassName
getParentTypeOption ( ) : Option
getPropertyByNameInContext ( CodeBase $code_base, string $name, Context $context ) : Property
getPropertyList ( CodeBase $code_base ) : Property[]
getPropertyMap ( CodeBase $code_base ) : array
getReferenceCount ( CodeBase $code_base ) : integer
getTemplateTypeMap ( ) : array
getTraitFQSENList ( ) : array
hasCallMethod ( CodeBase $code_base ) : boolean
hasCallOrCallStaticMethod ( CodeBase $code_base ) : boolean
hasCallStaticMethod ( CodeBase $code_base ) : boolean
hasConstantWithName ( CodeBase $code_base, string $name ) : boolean
hasGetMethod ( CodeBase $code_base ) : boolean
hasGetOrSetMethod ( CodeBase $code_base ) : boolean
hasMethodWithName ( CodeBase $code_base, string $name ) : boolean
hasParentType ( ) : boolean
hasPropertyWithName ( CodeBase $code_base, string $name ) : boolean
hasSetMethod ( CodeBase $code_base ) : boolean
importAncestorClass ( CodeBase $code_base, Clazz $class, Option | Phan\Library\None $type_option ) : void Add properties, constants and methods from the given class to this.
importAncestorClasses ( CodeBase $code_base ) : null Add properties, constants and methods from all ancestors (parents, traits, .
importParentClass ( CodeBase $code_base ) * Add properties, constants and methods from the parent of this class
isAbstract ( ) : boolean
isFinal ( ) : boolean
isGeneric ( ) : boolean
isInterface ( ) : boolean
isSubclassOf ( CodeBase $code_base, Clazz $other ) : boolean
isTrait ( ) : boolean
setHasDynamicProperties ( boolean $has_dynamic_properties ) : void
setIsParentConstructorCalled ( boolean $is_parent_constructor_called ) : void
setParentType ( Type $parent_type = null ) : void

보호된 메소드들

메소드 설명
hydrateOnce ( CodeBase $code_base ) : void This method must be called before analysis begins.

비공개 메소드들

메소드 설명
getClassListFromFQSENList ( CodeBase $code_base, array $fqsen_list ) : array

메소드 상세

__construct() 공개 메소드

public __construct ( Context $context, string $name, UnionType $type, integer $flags, FullyQualifiedClassName $fqsen, Type $parent_type = null, array $interface_fqsen_list = [], array $trait_fqsen_list = [] )
$context Phan\Language\Context The context in which the structural element lives
$name string
$type Phan\Language\UnionType
$flags integer
$fqsen Phan\Language\FQSEN\FullyQualifiedClassName A fully qualified name for this class
$parent_type Phan\Language\Type
$interface_fqsen_list array
$trait_fqsen_list array

__toString() 공개 메소드

public __toString ( ) : string
리턴 string A string describing this class

addConstant() 공개 메소드

Add a class constant
public addConstant ( CodeBase $code_base, ClassConstant $constant ) : null;
$code_base Phan\CodeBase
$constant ClassConstant
리턴 null;

addInterfaceClassFQSEN() 공개 메소드

public addInterfaceClassFQSEN ( Phan\Language\FQSEN $fqsen ) : null
$fqsen Phan\Language\FQSEN Add the given FQSEN to the list of implemented interfaces for this class
리턴 null

addMethod() 공개 메소드

Add a method to this class
public addMethod ( CodeBase $code_base, Method $method, Option | Phan\Library\None $type_option ) : null
$code_base Phan\CodeBase A reference to the code base in which the ancestor exists
$method Method The method to copy onto this class
$type_option Option | Phan\Library\None
리턴 null

addProperty() 공개 메소드

Add a property to this class
public addProperty ( CodeBase $code_base, Property $property, Option | Phan\Library\None $type_option ) : void
$code_base Phan\CodeBase A reference to the code base in which the ancestor exists
$property Property The property to copy onto this class
$type_option Option | Phan\Library\None
리턴 void

addTraitFQSEN() 공개 메소드

public addTraitFQSEN ( Phan\Language\FQSEN $fqsen ) : null
$fqsen Phan\Language\FQSEN
리턴 null

analyze() 최종 공개 메소드

This method should be called after hydration
final public analyze ( CodeBase $code_base ) : void
$code_base Phan\CodeBase
리턴 void

fromClassName() 공개 정적인 메소드

public static fromClassName ( CodeBase $code_base, string $class_name ) : Clazz
$code_base Phan\CodeBase A reference to the entire code base in which this context exists
$class_name string The name of a builtin class to build a new Class structural element from.
리턴 Clazz A Class structural element representing the given named builtin.

fromReflectionClass() 공개 정적인 메소드

public static fromReflectionClass ( CodeBase $code_base, ReflectionClass $class ) : Clazz
$code_base Phan\CodeBase A reference to the entire code base in which this context exists
$class ReflectionClass A reflection class representing a builtin class.
리턴 Clazz A Class structural element representing the given named builtin.

getAncestorClassList() 공개 메소드

public getAncestorClassList ( CodeBase $code_base ) : Clazz[]
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 Clazz[]

getAncestorFQSENList() 공개 메소드

public getAncestorFQSENList ( CodeBase $code_base ) : FullyQualifiedClassName[]
$code_base Phan\CodeBase
리턴 Phan\Language\FQSEN\FullyQualifiedClassName[]

getCallMethod() 공개 메소드

public getCallMethod ( CodeBase $code_base ) : Method
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 Method The magic `__call` method

getCallStaticMethod() 공개 메소드

public getCallStaticMethod ( CodeBase $code_base ) : Method
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 Method The magic `__callStatic` method

getConstantMap() 공개 메소드

public getConstantMap ( CodeBase $code_base ) : array
$code_base Phan\CodeBase
리턴 array The constants associated with this class

getConstantWithName() 공개 메소드

public getConstantWithName ( CodeBase $code_base, string $name ) : ClassConstant
$code_base Phan\CodeBase
$name string
리턴 ClassConstant The class constant with the given name.

getFQSEN() 공개 메소드

public getFQSEN ( ) : FullyQualifiedClassName
리턴 Phan\Language\FQSEN\FullyQualifiedClassName

getHasDynamicProperties() 공개 메소드

public getHasDynamicProperties ( CodeBase $code_base ) : boolean
$code_base Phan\CodeBase
리턴 boolean True if this class calls its parent constructor

getHierarchyDepth() 공개 메소드

public getHierarchyDepth ( CodeBase $code_base ) : integer
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 integer This class's depth in the class hierarchy

getHierarchyRootFQSEN() 공개 메소드

public getHierarchyRootFQSEN ( CodeBase $code_base ) : FullyQualifiedClassName
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 Phan\Language\FQSEN\FullyQualifiedClassName The FQSEN of the root class on this class's hiearchy

getInterfaceFQSENList() 공개 메소드

public getInterfaceFQSENList ( ) : array
리턴 array Get the list of interfaces implemented by this class

getIsParentConstructorCalled() 공개 메소드

public getIsParentConstructorCalled ( ) : boolean
리턴 boolean True if this class calls its parent constructor

getMethodByName() 공개 메소드

public getMethodByName ( CodeBase $code_base, string $name ) : Method
$code_base Phan\CodeBase
$name string
리턴 Method The method with the given name

getMethodByNameInContext() 공개 메소드

public getMethodByNameInContext ( CodeBase $code_base, string $name, Context $context ) : Method
$code_base Phan\CodeBase
$name string
$context Phan\Language\Context
리턴 Method The method with the given name

getMethodMap() 공개 메소드

public getMethodMap ( CodeBase $code_base ) : array
$code_base Phan\CodeBase
리턴 array A list of methods on this class

getNonParentAncestorFQSENList() 공개 메소드

public getNonParentAncestorFQSENList ( CodeBase $code_base ) : FullyQualifiedClassName[]
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 Phan\Language\FQSEN\FullyQualifiedClassName[]

getOverridableAncestorClassList() 공개 메소드

public getOverridableAncestorClassList ( CodeBase $code_base ) : Clazz[]
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 Clazz[]

getOverridableAncestorFQSENList() 공개 메소드

public getOverridableAncestorFQSENList ( CodeBase $code_base ) : FullyQualifiedClassName[]
$code_base Phan\CodeBase
리턴 Phan\Language\FQSEN\FullyQualifiedClassName[] The set of FQSENs representing extended classes and traits for which this class could have overriding methods and properties.

getParentClass() 공개 메소드

public getParentClass ( CodeBase $code_base ) : Clazz
$code_base Phan\CodeBase
리턴 Clazz The parent class of this class if defined

getParentClassFQSEN() 공개 메소드

public getParentClassFQSEN ( ) : FullyQualifiedClassName
리턴 Phan\Language\FQSEN\FullyQualifiedClassName The parent class of this class if one exists

getParentTypeOption() 공개 메소드

public getParentTypeOption ( ) : Option
리턴 Option

getPropertyByNameInContext() 공개 메소드

public getPropertyByNameInContext ( CodeBase $code_base, string $name, Context $context ) : Property
$code_base Phan\CodeBase
$name string The name of the property
$context Phan\Language\Context The context of the caller requesting the property
리턴 Property A property with the given name

getPropertyList() 공개 메소드

public getPropertyList ( CodeBase $code_base ) : Property[]
$code_base Phan\CodeBase
리턴 Property[] The list of properties defined on this class

getPropertyMap() 공개 메소드

public getPropertyMap ( CodeBase $code_base ) : array
$code_base Phan\CodeBase
리턴 array The list of properties on this class

getReferenceCount() 공개 메소드

public getReferenceCount ( CodeBase $code_base ) : integer
$code_base Phan\CodeBase
리턴 integer The number of references to this typed structural element

getTemplateTypeMap() 공개 메소드

public getTemplateTypeMap ( ) : array
리턴 array The set of all template types parameterizing this generic class

getTraitFQSENList() 공개 메소드

public getTraitFQSENList ( ) : array
리턴 array A list of FQSEN's for included traits

hasCallMethod() 공개 메소드

public hasCallMethod ( CodeBase $code_base ) : boolean
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 boolean True if this class has a magic '__call' method

hasCallOrCallStaticMethod() 공개 메소드

public hasCallOrCallStaticMethod ( CodeBase $code_base ) : boolean
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 boolean True if this class has a magic '__call' or '__callStatic' method

hasCallStaticMethod() 공개 메소드

public hasCallStaticMethod ( CodeBase $code_base ) : boolean
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 boolean True if this class has a magic '__callStatic' method

hasConstantWithName() 공개 메소드

public hasConstantWithName ( CodeBase $code_base, string $name ) : boolean
$code_base Phan\CodeBase
$name string
리턴 boolean True if a constant with the given name is defined on this class.

hasGetMethod() 공개 메소드

public hasGetMethod ( CodeBase $code_base ) : boolean
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 boolean True if this class has a magic '__get' method

hasGetOrSetMethod() 공개 메소드

public hasGetOrSetMethod ( CodeBase $code_base ) : boolean
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 boolean True if this class has a magic '__get' or '__set' method

hasMethodWithName() 공개 메소드

public hasMethodWithName ( CodeBase $code_base, string $name ) : boolean
$code_base Phan\CodeBase
$name string
리턴 boolean True if this class has a method with the given name

hasParentType() 공개 메소드

public hasParentType ( ) : boolean
리턴 boolean True if this class has a parent class

hasPropertyWithName() 공개 메소드

public hasPropertyWithName ( CodeBase $code_base, string $name ) : boolean
$code_base Phan\CodeBase
$name string
리턴 boolean

hasSetMethod() 공개 메소드

public hasSetMethod ( CodeBase $code_base ) : boolean
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 boolean True if this class has a magic '__set' method

hydrateOnce() 보호된 메소드

This method must be called before analysis begins.
protected hydrateOnce ( CodeBase $code_base ) : void
$code_base Phan\CodeBase
리턴 void

importAncestorClass() 공개 메소드

Add properties, constants and methods from the given class to this.
public importAncestorClass ( CodeBase $code_base, Clazz $class, Option | Phan\Library\None $type_option ) : void
$code_base Phan\CodeBase A reference to the code base in which the ancestor exists
$class Clazz A class to import from
$type_option Option | Phan\Library\None
리턴 void

importAncestorClasses() 공개 메소드

..) to this class
public importAncestorClasses ( CodeBase $code_base ) : null
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details
리턴 null

importParentClass() 공개 메소드

* Add properties, constants and methods from the parent of this class
public importParentClass ( CodeBase $code_base )
$code_base Phan\CodeBase The entire code base from which we'll find ancestor details

isAbstract() 공개 메소드

public isAbstract ( ) : boolean
리턴 boolean True if this is an abstract class

isFinal() 공개 메소드

public isFinal ( ) : boolean
리턴 boolean True if this is a final class

isGeneric() 공개 메소드

public isGeneric ( ) : boolean
리턴 boolean True if this class contains generic types

isInterface() 공개 메소드

public isInterface ( ) : boolean
리턴 boolean True if this is an interface

isSubclassOf() 공개 메소드

public isSubclassOf ( CodeBase $code_base, Clazz $other ) : boolean
$code_base Phan\CodeBase
$other Clazz
리턴 boolean

isTrait() 공개 메소드

public isTrait ( ) : boolean
리턴 boolean True if this class is a trait

setHasDynamicProperties() 공개 메소드

public setHasDynamicProperties ( boolean $has_dynamic_properties ) : void
$has_dynamic_properties boolean
리턴 void

setIsParentConstructorCalled() 공개 메소드

public setIsParentConstructorCalled ( boolean $is_parent_constructor_called ) : void
$is_parent_constructor_called boolean
리턴 void

setParentType() 공개 메소드

public setParentType ( Type $parent_type = null ) : void
$parent_type Phan\Language\Type The type of the parent (extended) class of this class.
리턴 void