Overview

Namespaces

  • Pharborist
    • Constants
    • ControlStructures
    • Exceptions
    • Functions
    • Generators
    • Namespaces
    • Objects
    • Operators
    • Types
    • Variables

Classes

  • ArrayLookupNode
  • BacktickNode
  • BlankStatementNode
  • CommaListNode
  • CommentNode
  • DocCommentNode
  • EchoStatementNode
  • EchoTagStatementNode
  • ExpressionStatementNode
  • Filter
  • Formatter
  • FormatterFactory
  • LineCommentBlockNode
  • Node
  • NodeCollection
  • OperatorFactory
  • ParenthesisNode
  • ParentNode
  • Parser
  • PartialCommentNode
  • PartialNode
  • RootNode
  • SourceDiscovery
  • SourcePosition
  • SplatNode
  • StatementBlockNode
  • StatementNode
  • TemplateNode
  • Token
  • TokenIterator
  • Tokenizer
  • TokenNode
  • UnsetStatementNode
  • VisitorBase
  • WhitespaceNode

Interfaces

  • ExpressionNode
  • NodeInterface
  • ParentNodeInterface
  • ParserException
  • VisitorInterface

Traits

  • DocCommentTrait
  • ParenTrait
  • UncommentTrait
  • Overview
  • Namespace
  • Class

Class RootNode

The root node of any Pharborist syntax tree.

Pharborist\Node implements Pharborist\NodeInterface
Extended by Pharborist\ParentNode implements Pharborist\ParentNodeInterface
Extended by Pharborist\StatementBlockNode
Extended by Pharborist\RootNode
Namespace: Pharborist
Located at RootNode.php
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

Pharborist\NodeCollection
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

Pharborist\Namespaces\NamespaceNode|null
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

$absolute

Returns

string[]
Methods inherited from Pharborist\StatementBlockNode
getClassAliases(), getStatements(), getUseDeclarations()
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()
Pharborist API documentation generated by ApiGen