PHP Class Phan\Language\FQSEN\FullyQualifiedGlobalStructuralElement

Inheritance: extends Phan\Language\FQSEN, use trait Phan\Language\FQSEN\Alternatives, use trait Phan\Memoize
Show file Open project: etsy/phan Class Usage Examples

Public Methods

Method Description
__toString ( ) : string
fromFullyQualifiedString ( string $fully_qualified_string ) : static
fromStringInContext ( string $fqsen_string, Context $context ) : static
getNamespace ( ) : string
make ( string $namespace, string $name, integer $alternate_id ) : static
toString ( string $namespace, string $name, integer $alternate_id ) : string
withAlternateId ( integer $alternate_id ) : static
withNamespace ( string $namespace ) : static

Protected Methods

Method Description
__construct ( string $namespace, string $name, integer $alternate_id )
cleanNamespace ( string $namespace ) : string
getNamespaceMapType ( ) : integer

Method Details

__construct() protected method

protected __construct ( string $namespace, string $name, integer $alternate_id )
$namespace string The namespace in this element's scope
$name string The name of this structural element
$alternate_id integer An alternate ID for the elemnet for use when there are multiple definitions of the element

__toString() public method

public __toString ( ) : string
return string A string representation of this fully-qualified structural element name.

cleanNamespace() protected static method

protected static cleanNamespace ( string $namespace ) : string
$namespace string
return string A cleaned version of the given namespace such that its always prefixed with a '\' and never ends in a '\', and is the string "\" if there is no namespace.

fromFullyQualifiedString() public static method

public static fromFullyQualifiedString ( string $fully_qualified_string ) : static
$fully_qualified_string string An fully qualified string like '\Namespace\Class'
return static

fromStringInContext() public static method

public static fromStringInContext ( string $fqsen_string, Context $context ) : static
$fqsen_string string An FQSEN string like '\Namespace\Class'
$context Phan\Language\Context The context in which the FQSEN string was found
return static

getNamespace() public method

public getNamespace ( ) : string
return string The namespace associated with this FQSEN or null if not defined

getNamespaceMapType() abstract protected static method

abstract protected static getNamespaceMapType ( ) : integer
return integer The namespace map type such as \ast\flags\USE_NORMAL or \ast\flags\USE_FUNCTION

make() public static method

public static make ( string $namespace, string $name, integer $alternate_id ) : static
$namespace string The namespace in this element's scope
$name string The name of this structural element
$alternate_id integer An alternate ID for the elemnet for use when there are multiple definitions of the element
return static

toString() public static method

public static toString ( string $namespace, string $name, integer $alternate_id ) : string
$namespace string
$name string
$alternate_id integer
return string A string representation of this fully-qualified structural element name.

withAlternateId() public method

public withAlternateId ( integer $alternate_id ) : static
$alternate_id integer
return static A FQSEN with the given alternate_id set

withNamespace() public method

public withNamespace ( string $namespace ) : static
$namespace string
return static