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 CommentNode

A comment.

Pharborist\Node implements Pharborist\NodeInterface
Extended by Pharborist\TokenNode
Extended by Pharborist\HiddenNode
Extended by Pharborist\CommentNode uses Pharborist\UncommentTrait

Direct known subclasses

Pharborist\DocCommentNode
Namespace: Pharborist
Located at CommentNode.php
Methods summary
public
# __construct( integer $type, string $text, Pharborist\SourcePosition $position = NULL )

Construct token.

Construct token.

Parameters

$type
$text
$position

Overrides

Pharborist\TokenNode::__construct()
public static Pharborist\CommentNode|Pharborist\LineCommentBlockNode
# create( string $comment )

Create line comment.

Create line comment.

Parameters

$comment
Comment without leading prefix.

Returns

Pharborist\CommentNode|Pharborist\LineCommentBlockNode
public string
# getCommentType( )

Returns

string
public boolean
# isLineComment( )

Returns

boolean
public string
# getCommentText( )

Returns

string
Methods inherited from Pharborist\TokenNode
__toString(), getSourcePosition(), getText(), getType(), getTypeName(), setText(), typeName()
Methods inherited from Pharborist\Node
__clone(), 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()
Methods used from Pharborist\UncommentTrait
uncomment()
Constants summary
string DOC
# '/**'
string BLOCK
# '/*'
string SINGLE
# '//'
string HASH
# '#'
Pharborist API documentation generated by ApiGen