Class NamespaceNode
A namespace declaration.
This node is used for both forms of namespace declaration:
namespace \Foo\Bar;
and
namespace \Foo\Baz { // Do amazing things here
}
Everything in the namespace is part of the namespace's body. This is the case even with the first form of the namespace. A parsed file with a namespace declaration at the top will have the declaration as one of its children (alongside any preceding comments and whitespace), and everything else in the file after the namespace declaration will be a descendant of that NamespaceNode.
- Pharborist\Node implements Pharborist\NodeInterface
-
Pharborist\ParentNode implements Pharborist\ParentNodeInterface
-
Pharborist\StatementNode
-
Pharborist\Namespaces\NamespaceNode uses Pharborist\DocCommentTrait
public static
|
|
public
|
|
public
|
|
public
boolean
|
#
owns(
Determine if the node belongs to this namespace. |
public
|
|
public
array
|
addCommentAbove(),
getLineCount(),
toComment()
|
__clone(),
__toString(),
acceptVisitor(),
addChild(),
addChildren(),
append(),
childCount(),
children(),
clear(),
find(),
firstChild(),
firstToken(),
getSourcePosition(),
getText(),
getTree(),
has(),
isDescendant(),
isEmpty(),
lastChild(),
lastToken(),
mergeNode(),
prepend(),
walk()
|
getDocComment(),
getIndent(),
setDocComment()
|