Class NameNode
The name of namespace, function, constant, class, trait or interface.
This node is used for things whose name is namespace-aware. Variables, for
example, cannot be namespaced, but classes can. That's why class names
are wrapped by NameNode: because NameNodes are aware of the namespace they
live in, even when moved from one namespace to another.
-
Pharborist\Node
implements
Pharborist\NodeInterface
-
Pharborist\ParentNode
implements
Pharborist\ParentNodeInterface
-
Pharborist\Namespaces\NameNode
Methods summary
public static
Pharborist\Namespaces\NameNode
|
#
create( string $name )
Create namespace path.
Parameters
Returns
|
public
Pharborist\Namespaces\NamespaceNode
|
#
getNamespace( )
Get the namespace that owns this name.
Get the namespace that owns this name.
Returns
|
public
string
|
|
public
array
|
#
getPathInfo( )
Return information about the name.
Return information about the name.
Returns
array
|
public
boolean
|
#
isAbsolute( )
Return TRUE if the name is an absolute name.
Eg. \TopNamespace\SubNamespace\MyClass
Return TRUE if the name is an absolute name.
Eg. \TopNamespace\SubNamespace\MyClass
Returns
boolean
|
public
boolean
|
#
isRelative( )
Return TRUE if the name is a relative name.
Eg. namespace\MyClass
Return TRUE if the name is a relative name.
Eg. namespace\MyClass
Returns
boolean
|
public
boolean
|
#
isUnqualified( )
Return TRUE if the name is a qualified name.
Eg. MyNamespace\MyClass
Return TRUE if the name is a qualified name.
Eg. MyNamespace\MyClass
Returns
boolean
|
public
boolean
|
#
isQualified( )
Return TRUE if the name is a qualified name.
Eg. MyNamespace\MyClass
Return TRUE if the name is a qualified name.
Eg. MyNamespace\MyClass
Returns
boolean
|
public
Pharborist\TokenNode[]
|
|
public
string
|
#
getPath( )
Get the namespace path.
Returns
string
|
public
string
|
|
public
boolean
|
#
isGlobal( )
Returns if this name is in the global namespace, which is functionally
the same as having no namespace.
Returns if this name is in the global namespace, which is functionally
the same as having no namespace.
Returns
boolean
|
public
string
|
#
getBaseName( )
Returns trailing name component of path.
Returns trailing name component of path.
Returns
string Last component of path.
|
Methods inherited from Pharborist\ParentNode
__clone(),
__toString(),
acceptVisitor(),
addChild(),
addChildren(),
append(),
childCount(),
children(),
clear(),
find(),
firstChild(),
firstToken(),
getSourcePosition(),
getText(),
getTree(),
has(),
isDescendant(),
isEmpty(),
lastChild(),
lastToken(),
mergeNode(),
prepend(),
walk()
|
Methods inherited from Pharborist\Node
after(),
appendTo(),
before(),
closest(),
fromValue(),
furthest(),
getLogicalBlock(),
getRoot(),
getStatement(),
hasRoot(),
index(),
insertAfter(),
insertBefore(),
is(),
isAllOf(),
isAnyOf(),
next(),
nextAll(),
nextToken(),
nextUntil(),
parent(),
parents(),
parentsUntil(),
prependTo(),
previous(),
previousAll(),
previousToken(),
previousUntil(),
remove(),
replaceAll(),
replaceWith(),
siblings(),
sortKey(),
swapWith()
|