PHP Class Phan\Language\Element\Method

Inheritance: extends Phan\Language\Element\TypedStructuralElement, use trait Phan\Language\Element\Addressable, use trait Phan\Analyze\Analyzable
Show file Open project: etsy/phan Class Usage Examples

Public Methods

Method Description
__construct ( Context $context, string $name, UnionType $type, integer $flags, FullyQualifiedMethodName $fqsen )
__toString ( ) : string
alternateGenerator ( CodeBase $code_base ) : Generator
defaultConstructorForClassInContext ( Clazz $clazz, Context $context, CodeBase $code_base ) : Method
fromNode ( Context $context, CodeBase $code_base, ast\Node\Decl $node, FullyQualifiedMethodName $fqsen ) : Method
getFQSEN ( ) : FullyQualifiedMethodName
getIsMagic ( ) : boolean
getIsMagicCall ( ) : boolean
getIsMagicCallStatic ( ) : boolean
getIsMagicGet ( ) : boolean
getIsMagicSet ( ) : boolean
getOverriddenMethod ( CodeBase $code_base ) : Phan\Language\Element\ClassElement
getUnionType ( ) : UnionType
isAbstract ( ) : boolean
returnsRef ( ) : boolean

Method Details

__construct() public method

public __construct ( Context $context, string $name, UnionType $type, integer $flags, FullyQualifiedMethodName $fqsen )
$context Phan\Language\Context The context in which the structural element lives
$name string
$type Phan\Language\UnionType
$flags integer
$fqsen Phan\Language\FQSEN\FullyQualifiedMethodName A fully qualified name for the element

__toString() public method

public __toString ( ) : string
return string A string representation of this method signature

alternateGenerator() public method

public alternateGenerator ( CodeBase $code_base ) : Generator
$code_base Phan\CodeBase
return Generator The set of all alternates to this method

defaultConstructorForClassInContext() public static method

public static defaultConstructorForClassInContext ( Clazz $clazz, Context $context, CodeBase $code_base ) : Method
$clazz Clazz
$context Phan\Language\Context
$code_base Phan\CodeBase
return Method A default constructor for the given class

fromNode() public static method

public static fromNode ( Context $context, CodeBase $code_base, ast\Node\Decl $node, FullyQualifiedMethodName $fqsen ) : Method
$context Phan\Language\Context The context in which the node appears
$code_base Phan\CodeBase
$node ast\Node\Decl An AST node representing a method
$fqsen Phan\Language\FQSEN\FullyQualifiedMethodName
return Method A Method representing the AST node in the given context

getFQSEN() public method

public getFQSEN ( ) : FullyQualifiedMethodName
return Phan\Language\FQSEN\FullyQualifiedMethodName

getIsMagic() public method

public getIsMagic ( ) : boolean
return boolean True if this is a magic method

getIsMagicCall() public method

public getIsMagicCall ( ) : boolean
return boolean True if this is the magic `__call` method

getIsMagicCallStatic() public method

public getIsMagicCallStatic ( ) : boolean
return boolean True if this is the magic `__callStatic` method

getIsMagicGet() public method

public getIsMagicGet ( ) : boolean
return boolean True if this is the magic `__get` method

getIsMagicSet() public method

public getIsMagicSet ( ) : boolean
return boolean True if this is the magic `__set` method

getOverriddenMethod() public method

public getOverriddenMethod ( CodeBase $code_base ) : Phan\Language\Element\ClassElement
$code_base Phan\CodeBase The code base with which to look for classes
return Phan\Language\Element\ClassElement The Method that this Method is overriding

getUnionType() public method

public getUnionType ( ) : UnionType
return Phan\Language\UnionType The type of this method in its given context.

isAbstract() public method

public isAbstract ( ) : boolean
return boolean True if this is an abstract method

returnsRef() public method

public returnsRef ( ) : boolean
return boolean True if this method returns reference