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 CommaListNode

Any comma-separated set of nodes. This includes class member lists, function call arguments, array elements, etc.

Pharborist\Node implements Pharborist\NodeInterface
Extended by Pharborist\ParentNode implements Pharborist\ParentNodeInterface
Extended by Pharborist\CommaListNode
Namespace: Pharborist
Located at CommaListNode.php
Methods summary
public Pharborist\NodeCollection
# getItems( )

Returns

Pharborist\NodeCollection
public Pharborist\Node
# getItem( integer $index )

Parameters

$index

Returns

Pharborist\Node

Throws

OutOfBoundsException
Index is out of bounds.
public
# prependItem( Pharborist\Node $item )

Prepend item.

Prepend item.

Parameters

$item

Returns


$this
public
# appendItem( Pharborist\Node $item )

Append item.

Append item.

Parameters

$item

Returns


$this
public
# insertItem( Pharborist\Node $item, integer $index )

Insert item before index.

Insert item before index.

Parameters

$item
$index

Returns


$this

Throws

OutOfBoundsException
Index out of bounds.
public
# removeItem( integer|Pharborist\Node $item )

Remove item.

Remove item.

Parameters

$item
The index of item or item to remove.

Returns


$this

Throws

OutOfBoundsException
Index out of bounds.
InvalidArgumentException
Item does not exist in list.
public Pharborist\Node
# pop( )

Pop an item off end of the list.

Pop an item off end of the list.

Returns

Pharborist\Node
The removed item. NULL if item list is empty.
public Pharborist\Node
# shift( )

Shift an item off start of the list.

Shift an item off start of the list.

Returns

Pharborist\Node
The removed item. NULL if item list is empty.
public Pharborist\Types\ArrayNode
# toArrayNode( )

Returns this comma list as an ArrayNode.

Returns this comma list as an ArrayNode.

Returns

Pharborist\Types\ArrayNode
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