Class DOMIT_NodeList
Provides a container for a 0-indexed sequence of nodes.

isPublic? yes
isAbstract? no

Inheritance tree:

DOMIT_NodeList (top level class)

Known subclasses:

None

Source file: xml_domit_nodemaps.php




Constructor
Instantiates a new DOMIT_NodeList object.

Signature: DOMIT_NodeList()

isPublic? no




Public Constants



Private Constants



Public Fields



Private Fields
arNodeList
An array containing the list of DOMIT_Nodes.

Type: array




Public Methods
item
Returns the node at the specified index (0-based).

Signature: &item($index)

Parameters:

int index - The index of the DOMIT_Node to be returned.

Returns:

DOMIT_Node - The DOMIT_Node at the index specified, or null if nothing is found at that location.

Example:

The third node in the node list is returned:

$thirdNode =& myNodeList->item(2);

getLength
Returns the number of nodes in the node list.

Signature: getLength()

Returns:

int - The number of nodes in the node list.

Example:

The number of nodes in the node list are returned:

$numNodes = myNodeList->getLength();




Private Methods
appendNode
Appends the specified node to the list. Does not check if the node is already present.

Signature: &appendNode($node)

Parameters:

DOMIT_Node node - The node to be appended.

Returns:

DOMIT_Node - The node that was just appended.

Example:

A node is appended to $myNodeList:

$returnedNode =& myNodeList->appendNode($aNode);

removeNode
Removes the specified node from the list.

Signature: &removeNode($node)

Parameters:

DOMIT_Node node - The node to be removed.

Returns:

DOMIT_Node - The node that was just removed, or null if it wasn't found.

Example:

A node is removed from $myNodeList:

$returnedNode =& myNodeList->removeNode($aNode);


Documentation generated by ClassyDoc, using the DOMIT! and SAXY parsers.
Please visit Engage Interactive to download free copies.