class DOMNamedNodeMap implements IteratorAggregate, Countable (View source)

The DOMNamedNodeMap class

Properties

int read-only $length

The number of nodes in the map. The range of valid child node indices is 0 to length - 1 inclusive.

Methods

DOMNode|null
getNamedItem(string $qualifiedName)

Retrieves a node specified by name

void
setNamedItem(DOMNode $arg)

No description

removeNamedItem($name)

No description

DOMNode|null
item(int $index)

Retrieves a node specified by index

DOMNode|null
getNamedItemNS($namespaceURI = '', string|null $namespace, string $localName)

Retrieves a node specified by local name and namespace URI

setNamedItemNS(DOMNode $arg)

No description

removeNamedItemNS($namespace, $localName)

No description

int
count()

No description

getIterator()

No description

Details

DOMNode|null getNamedItem(string $qualifiedName)

Retrieves a node specified by name

Parameters

string $qualifiedName

The nodeName of the node to retrieve.

Return Value

DOMNode|null

A node (of any type) with the specified nodeName, or null if no node is found.

void setNamedItem(DOMNode $arg)

No description

Parameters

DOMNode $arg

Return Value

void

removeNamedItem($name)

No description

Parameters

$name [optional]

DOMNode|null item(int $index)

Retrieves a node specified by index

Parameters

int $index

Index into this map.

Return Value

DOMNode|null

The node at the indexth position in the map, or null if that is not a valid index (greater than or equal to the number of nodes in this map).

DOMNode|null getNamedItemNS($namespaceURI = '', string|null $namespace, string $localName)

Retrieves a node specified by local name and namespace URI

Parameters

$namespaceURI
string|null $namespace

The namespace URI of the node to retrieve.

string $localName

The local name of the node to retrieve.

Return Value

DOMNode|null

A node (of any type) with the specified local name and namespace URI, or null if no node is found.

setNamedItemNS(DOMNode $arg)

No description

Parameters

DOMNode $arg [optional]

removeNamedItemNS($namespace, $localName)

No description

Parameters

$namespace [optional]
$localName [optional]

int count()

Since: 7.2

No description

Return Value

int

The custom count as an integer.

The return value is cast to an integer.

Traversable getIterator()

Since: 8.0

No description

Return Value

Traversable

An instance of an object implementing Iterator or Traversable