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 TokenIterator

Iterator over tokens that supports peek.

Namespace: Pharborist
Located at TokenIterator.php
Methods summary
public
# __construct( array $tokens )

Parameters

$tokens
public Pharborist\TokenNode
# current( )

Return the current token.

Return the current token.

Returns

Pharborist\TokenNode
public Pharborist\TokenNode
# peek( integer $offset )

Peek ahead.

Peek ahead.

Parameters

$offset
Offset from current position.

Returns

Pharborist\TokenNode
public Pharborist\TokenNode
# next( )

Move to the next token and return it.

Move to the next token and return it.

Returns

Pharborist\TokenNode
public boolean
# hasNext( )

Return TRUE if there are more tokens.

Return TRUE if there are more tokens.

Returns

boolean
public Pharborist\SourcePosition
# getSourcePosition( )

Return the source position.

Return the source position.

Returns

Pharborist\SourcePosition
Pharborist API documentation generated by ApiGen