PHP Trait Phan\Language\FQSEN\Alternatives

An alternate ID will be appended to a name such as in \Name\Space\class,1 or \Name\Space\class::function,1 or when composed as \Name\Space\class,1::function,1.
Show file Open project: etsy/phan

Protected Properties

Property Type Description
$alternate_id integer An alternate ID for the elemnet for use when there are multiple definitions of the element

Public Methods

Method Description
getAlternateId ( ) : integer
getCanonicalFQSEN ( ) : Phan\Language\FQSEN
getName ( ) : string Implementers must have a getName() method
getNameWithAlternateId ( ) : string
isAlternate ( ) : boolean
withAlternateId ( integer $alternate_id ) : Phan\Language\FQSEN

Protected Methods

Method Description
memoizeFlushAll ( ) Implementers should use the \Phan\Memoize trait

Method Details

getAlternateId() public method

public getAlternateId ( ) : integer
return integer An alternate identifier associated with this FQSEN or zero if none if this is not an alternative.

getCanonicalFQSEN() public method

public getCanonicalFQSEN ( ) : Phan\Language\FQSEN
return Phan\Language\FQSEN Get the canonical (non-alternate) FQSEN associated with this FQSEN

getName() abstract public method

Implementers must have a getName() method
abstract public getName ( ) : string
return string

getNameWithAlternateId() public method

public getNameWithAlternateId ( ) : string
return string Get the name of this element with its alternate id attached

isAlternate() public method

public isAlternate ( ) : boolean
return boolean True if this is an alternate

memoizeFlushAll() abstract protected method

Implementers should use the \Phan\Memoize trait
abstract protected memoizeFlushAll ( )

withAlternateId() abstract public method

abstract public withAlternateId ( integer $alternate_id ) : Phan\Language\FQSEN
$alternate_id integer
return Phan\Language\FQSEN A FQSEN with the given alternate_id set

Property Details

$alternate_id protected property

An alternate ID for the elemnet for use when there are multiple definitions of the element
protected int $alternate_id
return integer