Class RootNode
The root node of any Pharborist syntax tree.
-
Pharborist\Node
implements
Pharborist\NodeInterface
-
Pharborist\ParentNode
implements
Pharborist\ParentNodeInterface
-
Pharborist\StatementBlockNode
-
Pharborist\RootNode
Methods summary
public static
static
|
#
create( string|null $ns = NULL )
Creates a new, blank PHP source file.
Creates a new, blank PHP source file.
Parameters
- $ns
- If provided, the new document will have this namespace added to it.
Returns
static
|
public
boolean
|
#
hasNamespace( string $ns )
Returns if this document contains a particular namespace.
Returns if this document contains a particular namespace.
Parameters
- $ns
- The name of the namespace to look for.
Returns
boolean
|
public
Pharborist\NodeCollection
|
#
getNamespaces( )
Returns every namespace in this document.
Returns every namespace in this document.
Returns
|
public
Pharborist\Namespaces\NamespaceNode |null
|
#
getNamespace( string $ns )
Returns a particular namespace, if it exists.
Returns a particular namespace, if it exists.
Parameters
- $ns
- The name of the namespace to look for.
Returns
|
public
string[]
|
#
getNamespaceNames( boolean $absolute = FALSE )
Returns the name of every namespace in this document.
Returns the name of every namespace in this document.
Parameters
Returns
string[]
|
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()
|