Class DOMIT_Lite_Node

Description

The base class of all DOMIT node types

Located in /includes/domit/xml_domit_lite_parser.php (line 37)


	
			
Direct descendents
Class Description
DOMIT_Lite_ChildNodes_Interface A parent class for nodes which possess child nodes
DOMIT_Lite_TextNode A class representing the DOM Text Node
Variable Summary
Array $attributes
Array $childNodes
Object $firstChild
Object $lastChild
Object $nextSibling
string $nodeName
int $nodeType
string $nodeValue
Object $parentNode
string $uid
Method Summary
DOMIT_Lite_Node DOMIT_Lite_Node ()
Object &appendChild (Object &$child)
void clearReferences ()
Object &cloneNode ([boolean $deep = false])
string forHTML (string $str, [boolean $doPrint = false])
int getChildNodeIndex (Array &$arr, Object &$child)
mixed &getElementsByPath (string $pattern, int $nodeIndex)
void getNamedElements (Object &$nodeList, string $tagName)
string getText ()
boolean hasChildNodes ()
Object &insertBefore (Object &$newChild, Object &$refChild)
mixed &nvl (mixed &$value, mixed $default)
void onLoad ()
Object &removeChild (Object &$oldChild)
Object &replaceChild (Object &$newChild, Object &$oldChild)
void setOwnerDocument (Object &$rootNode)
Array toArray ()
string toNormalizedString ([boolean $htmlSafe = false], [boolean $subEntities = true])
void _constructor ()
Variables
Array $attributes = null (line 57)
  • var: An array of attribute key / value pairs
int $childCount = 0 (line 63)
  • var: The number of children of the current node
Array $childNodes = null (line 47)
  • var: An array of child node references
Object $firstChild = null (line 49)
  • var: A reference to the first node in the childNodes list
Object $lastChild = null (line 51)
  • var: A reference to the last node in the childNodes list
Object $nextSibling = null (line 55)
  • var: A reference to the node after the current node in its parents childNodes list
string $nodeName = null (line 39)
  • var: The name of the node, varies according to node type
int $nodeType = null (line 43)
  • var: The type of node, e.g. CDataSection
string $nodeValue = null (line 41)
  • var: The value of the node, varies according to node type
Object $ownerDocument = null (line 59)
  • var: A reference to the Document node
Object $parentNode = null (line 45)
  • var: A reference to the parent of the current node
Object $previousSibling = null (line 53)
  • var: A reference to the node prior to the current node in its parents childNodes list
string $uid (line 61)
  • var: The unique node id
Methods
Constructor DOMIT_Lite_Node (line 68)

Raises error if abstract class is directly instantiated

DOMIT_Lite_Node DOMIT_Lite_Node ()
appendChild (line 87)

Appends a node to the childNodes list of the current node

  • return: The appended node
  • abstract:
Object &appendChild (Object &$child)
  • Object &$child: The node to be appended

Redefined in descendants as:
clearReferences (line 263)

Clears previousSibling, nextSibling, and parentNode references from a node that has been removed

void clearReferences ()
cloneNode (line 161)

Copies a node and/or its children

  • return: A copy of the node and/or its children
  • abstract:
Object &cloneNode ([boolean $deep = false])
  • boolean $deep: True if all child nodes are also to be cloned

Redefined in descendants as:
forHTML (line 233)

Formats a string for presentation as HTML

  • return: The HTML formatted string
string forHTML (string $str, [boolean $doPrint = false])
  • string $str: The string to be formatted
  • boolean $doPrint: True if the string is to be sent directly to output
getChildNodeIndex (line 133)

Returns the index of the specified node in a childNodes list

  • return: The index of the target node, or -1 if not found
int getChildNodeIndex (Array &$arr, Object &$child)
  • Array &$arr: The childNodes array to be searched
  • Object &$child: The node targeted by the search
getElementsByPath (line 214)

Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like expression.

  • return: A NodeList or single node that matches the pattern
  • abstract:
mixed &getElementsByPath (string $pattern, int $nodeIndex)
  • string $pattern: The query pattern
  • int $nodeIndex: If a single node is to be returned (rather than the entire NodeList) the index of that node

Redefined in descendants as:
getNamedElements (line 171)

Adds elements with the specified tag name to a NodeList collection

void getNamedElements (Object &$nodeList, string $tagName)
  • Object &$nodeList: The NodeList collection
  • string $tagName: The tag name of matching elements

Redefined in descendants as:
getText (line 223)

Returns the concatented text of the current node and its children

  • return: The concatented text of the current node and its children
string getText ()

Redefined in descendants as:
hasChildNodes (line 151)

Determines whether a node has any children

  • return: True if any child nodes are present
boolean hasChildNodes ()
insertBefore (line 99)

Inserts a node to the childNodes list of the current node

  • return: The inserted node
  • abstract:
Object &insertBefore (Object &$newChild, Object &$refChild)
  • Object &$newChild: The node to be inserted
  • Object &$refChild: The node before which the insertion is to occur

Redefined in descendants as:
nvl (line 202)

Tests whether a value is null, and if so, returns a default value

  • return: The specified value, or the default value if null
mixed &nvl (mixed &$value, mixed $default)
  • mixed &$value: The value to be tested
  • mixed $default: The default value
onLoad (line 252)

A node event that can be set to fire upon document loading, used for node initialization

  • abstract:
void onLoad ()
removeChild (line 122)

Removes a node from the childNodes list of the current node

  • return: The removed node
  • abstract:
Object &removeChild (Object &$oldChild)
  • Object &$oldChild: The node to be removed

Redefined in descendants as:
replaceChild (line 111)

Replaces a node with another

  • return: The new node
  • abstract:
Object &replaceChild (Object &$newChild, Object &$oldChild)
  • Object &$newChild: The new node
  • Object &$oldChild: The old node

Redefined in descendants as:
setOwnerDocument (line 180)

Sets the ownerDocument property of a node to the containing DOMIT_Document

void setOwnerDocument (Object &$rootNode)
  • Object &$rootNode: A reference to the document element of the DOMIT_Document
toArray (line 243)

Generates an array representation of the node and its children

  • return: A representation of the node and its children
  • abstract:
Array toArray ()

Redefined in descendants as:
toNormalizedString (line 284)

Generates a normalized (formatted for readability) representation of the node and its children

  • return: The formatted string representation
string toNormalizedString ([boolean $htmlSafe = false], [boolean $subEntities = true])
  • boolean $htmlSafe: True if HTML readable output is desired
  • boolean $subEntities: True if illegal xml characters in text nodes and attributes should be converted to entities
_constructor (line 76)

DOMIT_Lite_Node constructor, assigns a uid

void _constructor ()

Documentation generated on Fri, 4 Mar 2005 13:57:41 +1000 by phpDocumentor 1.3.0RC3