Class CommaListNode
Any comma-separated set of nodes. This includes class member lists, function
call arguments, array elements, etc.
-
Pharborist\Node
implements
Pharborist\NodeInterface
-
Pharborist\ParentNode
implements
Pharborist\ParentNodeInterface
-
Pharborist\CommaListNode
Methods summary
public
Pharborist\NodeCollection
|
|
public
Pharborist\Node
|
#
getItem( integer $index )
Parameters
Returns
Throws
OutOfBoundsException Index is out of bounds.
|
public
|
|
public
|
|
public
|
#
insertItem( Pharborist\Node $item, integer $index )
Insert item before index.
Insert item before index.
Parameters
Returns
$this
Throws
OutOfBoundsException Index out of bounds.
|
public
|
#
removeItem( integer|Pharborist\Node $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
|
public
Pharborist\Node
|
#
shift( )
Shift an item off start of the list.
Shift an item off start of the list.
Returns
|
public
Pharborist\Types\ArrayNode
|
#
toArrayNode( )
Returns this comma list as an ArrayNode.
Returns this comma list as an ArrayNode.
Returns
|
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()
|