class DOMNodeList implements IteratorAggregate, Countable (View source)

The DOMNodeList class

Properties

int $length

Methods

TNode|null
item(int $index)

Retrieves a node specified by index

int<0, max>
count()

No description

TValue>|TValue[]
getIterator()

No description

Details

TNode|null item(int $index)

Retrieves a node specified by index

Parameters

int $index

Index of the node into the collection. The range of valid child node indices is 0 to length - 1 inclusive.

Return Value

TNode|null

The node at the indexth position in the DOMNodeList, or null if that is not a valid index.

int<0, max> count()

Since: 7.2

No description

Return Value

int<0, max>

The custom count as an integer.

The return value is cast to an integer.

TValue>|TValue[] getIterator()

Since: 8.0

No description

Return Value

TValue>|TValue[]

An instance of an object implementing Iterator or Traversable