Class DOMIT_Node

Description

The base class of all DOMIT node types

Located in /includes/domit/xml_domit_parser.php (line 40)


	
			
Direct descendents
Class Description
DOMIT_ChildNodes_Interface A parent class for nodes which possess child nodes
DOMIT_CharacterData A parent class for Text and CDATA Section nodes
DOMIT_Attr A class representing the Attr node
DOMIT_ProcessingInstruction A class representing the DOM Processing Instruction node
DOMIT_DocumentType A class representing the DOM Document Type node
DOMIT_Notation A class representing the DOM Notation node (NOT YET IMPLEMENTED!)
Variable Summary
Object $attributes
Array $childNodes
Object $firstChild
Object $lastChild
String $localname
String $namespaceURI
Object $nextSibling
string $nodeName
int $nodeType
string $nodeValue
Object $parentNode
String $prefix
string $uid
Method Summary
DOMIT_Node DOMIT_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 &getElementsByAttributePath (string $pattern, int $nodeIndex)
mixed &getElementsByPath (string $pattern, int $nodeIndex)
void getNamedElements (Object &$nodeList, string $tagName)
string getText ()
void getTypedNodes (Object &$nodeList, string $type)
void getValuedNodes (Object &$nodeList, string $value)
boolean hasAttributes ()
boolean hasChildNodes ()
Object &insertBefore (Object &$newChild, Object &$refChild)
boolean isSupported (string $feature, [string $version = null])
void normalize ()
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
Object $attributes = null (line 60)
  • var: A NodeList of attribute nodes
int $childCount = 0 (line 72)
  • var: The number of children of the current node
Array $childNodes = null (line 50)
  • var: An array of child node references
Object $firstChild = null (line 52)
  • var: A reference to the first node in the childNodes list
Object $lastChild = null (line 54)
  • var: A reference to the last node in the childNodes list
String $localname = null (line 68)
  • var: The local name of the node
String $namespaceURI = null (line 64)
  • var: A URI that identifies the XML namespace to which the node belongs
Object $nextSibling = null (line 58)
  • var: A reference to the node after the current node in its parents childNodes list
string $nodeName = null (line 42)
  • var: The name of the node, varies according to node type
int $nodeType = null (line 46)
  • var: The type of node, e.g. CDataSection
string $nodeValue = null (line 44)
  • var: The value of the node, varies according to node type
Object $ownerDocument = null (line 62)
  • var: A reference to the Document node
Object $parentNode = null (line 48)
  • var: A reference to the parent of the current node
String $prefix = null (line 66)
  • var: The namespace prefix for the node
Object $previousSibling = null (line 56)
  • var: A reference to the node prior to the current node in its parents childNodes list
string $uid (line 70)
  • var: The unique node id
Methods
Constructor DOMIT_Node (line 77)

Raises error if abstract class is directly instantiated

DOMIT_Node DOMIT_Node ()
appendChild (line 96)

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 342)

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

void clearReferences ()
cloneNode (line 188)

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 312)

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 142)

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
getElementsByAttributePath (line 253)

Retrieves an element or DOMIT_NodeList of elements corresponding to an Xpath-like attribute expression (NOT YET IMPLEMENTED!)

  • return: A NodeList or single node that matches the pattern
  • abstract:
mixed &getElementsByAttributePath (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:
getElementsByPath (line 241)

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 198)

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 284)

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:
getTypedNodes (line 264)

Adds all child nodes of the specified nodeType to the NodeList

  • abstract:
void getTypedNodes (Object &$nodeList, string $type)
  • Object &$nodeList: The NodeList collection
  • string $type: The nodeType of matching nodes

Redefined in descendants as:
getValuedNodes (line 275)

Adds all child nodes of the specified nodeValue to the NodeList

  • abstract:
void getValuedNodes (Object &$nodeList, string $value)
  • Object &$nodeList: The NodeList collection
  • string $value: The nodeValue of matching nodes

Redefined in descendants as:
hasAttributes (line 168)

Determines whether a node has any attributes

  • return: True if the node has attributes
boolean hasAttributes ()

Redefined in descendants as:
hasChildNodes (line 160)

Determines whether a node has any children

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

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:
isSupported (line 294)

Indicates whether the specified feature is supported by the DOM implementation and this node

  • return: True if the specified feature is supported
boolean isSupported (string $feature, [string $version = null])
  • string $feature: The feature
  • string $version: The version of the DOM implementation
normalize (line 176)

Collapses adjacent text nodes in entire node subtree

void normalize ()

Redefined in descendants as:
nvl (line 229)

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 331)

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

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

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 120)

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 207)

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 322)

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 363)

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 85)

DOMIT_Node constructor, assigns a uid

void _constructor ()

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