Public Member Functions | |
| __construct () | |
| Construct and initialise a new node instance. | |
| is_same_node ($other_node) | |
| Returns whether this node is the same node as the given one. | |
| append_child ($new_child) | |
| Adds the node $new_child to the end of the list of children of this node. | |
| append_children (&$new_children) | |
| Recursively appends children to this element. | |
| & | remove_child (&$old_child) |
| Removes the child node from the list of children, and returns it. | |
| & | replace_child (&$new_child, &$old_child) |
| Replaces a child node with a new child, and returns the old child node. | |
| & | insert_before (&$new_child, &$ref_child) |
| Inserts the node $new_child before the existing child node $ref_child. | |
| has_child_nodes () | |
| Returns whether this node has any children. | |
Static Public Member Functions | |
| static | create_for_value ($value) |
| Create a new DOM node for any value. | |
Public Attributes | |
| $node_type = null | |
| The node type. | |
| $node_name = null | |
| The name of this node, depending on its type. | |
| $owner_document = null | |
| The AnewtXMLDomDocument object associated with this node. | |
| $child_nodes = array() | |
| List of child nodes. | |
| $parent_node = null | |
| The parent of this node. | |
Protected Attributes | |
| $_attributes = null | |
| Hash of all attributes. | |
| $allowed_attributes = array() | |
| List of allowed attributes. | |
| $must_be_empty = false | |
| Whether this node can contain children. | |
| $allowed_elements = array() | |
| List of allowed child element names. | |
| $allows_text = true | |
| Whether this node can have text content. | |
Private Attributes | |
| $__object_id = null | |
| Used for identity checking. | |
AnewtXMLDomNode instances cannot be instantiated directly, since this class only serve as a base class for e.g. AnewtXMLDomElement and AnewtXMLDomText.
Definition at line 37 of file dom.lib.php.
| static AnewtXMLDomNode::create_for_value | ( | $ | value | ) | [static] |
Create a new DOM node for any value.
This method converts any value into a AnewtXMLDomNode instance (or subclass thereof). If the value is a renderer object, it is rendered. If the renderer object renders an AnewtXMLDomNode itself, it is used, else the rendered value is converted to a text node (which takes care of escaping).
| $value | The value to convert |
Definition at line 130 of file dom.lib.php.
| AnewtXMLDomNode::is_same_node | ( | $ | other_node | ) |
Returns whether this node is the same node as the given one.
| $other_node | A AnewtXMLDomNode instance to test against. |
Definition at line 174 of file dom.lib.php.
| AnewtXMLDomNode::append_child | ( | $ | new_child | ) |
Adds the node $new_child to the end of the list of children of this node.
The node may not be attached elsewhere in the tree already.
| $new_child | The node to add. |
Reimplemented in AnewtXMLDomDocument.
Definition at line 192 of file dom.lib.php.
| AnewtXMLDomNode::append_children | ( | &$ | new_children | ) |
Recursively appends children to this element.
Strings are converted into text nodes. This method expands numerical arrays and ignores null values.
| $new_children | Array of children elements |
Definition at line 254 of file dom.lib.php.
| & AnewtXMLDomNode::remove_child | ( | &$ | old_child | ) |
Removes the child node from the list of children, and returns it.
| $old_child | The node being removed. |
Definition at line 289 of file dom.lib.php.
| & AnewtXMLDomNode::replace_child | ( | &$ | new_child, | |
| &$ | old_child | |||
| ) |
Replaces a child node with a new child, and returns the old child node.
| $new_child | The new node to put in the child list. | |
| $old_child | The node being replaced in the list. |
Definition at line 339 of file dom.lib.php.
| & AnewtXMLDomNode::insert_before | ( | &$ | new_child, | |
| &$ | ref_child | |||
| ) |
Inserts the node $new_child before the existing child node $ref_child.
If $ref_child is null, insert $new_child at the end of the list of children.
| $new_child | The node to insert. | |
| $ref_child | The reference node, i.e., the node before which the new node must be inserted. |
Definition at line 365 of file dom.lib.php.
| AnewtXMLDomNode::has_child_nodes | ( | ) |
Returns whether this node has any children.
Definition at line 382 of file dom.lib.php.
| AnewtXMLDomNode::$node_type = null |
The node type.
Reimplemented in AnewtXMLDomDocument, AnewtXMLDomDocumentFragment, AnewtXMLDomElement, AnewtXMLDomText, AnewtXMLDomComment, and AnewtXMLDomRaw.
Definition at line 44 of file dom.lib.php.
| AnewtXMLDomNode::$node_name = null |
The name of this node, depending on its type.
Reimplemented in AnewtXHTMLForm, AnewtXHTMLInput, AnewtXHTMLButton, AnewtXHTMLTextarea, AnewtXHTMLSelect, AnewtXHTMLOption, AnewtXHTMLOptionGroup, AnewtXHTMLLabel, AnewtXHTMLFieldset, AnewtXHTMLLegend, AnewtXHTMLUnorderedList, AnewtXHTMLOrderedList, AnewtXHTMLListItem, AnewtXHTMLDefinitionList, AnewtXHTMLDefinitionTerm, AnewtXHTMLDefinitionDescription, AnewtXHTMLDiv, AnewtXHTMLSpan, AnewtXHTMLHeader1, AnewtXHTMLHeader2, AnewtXHTMLHeader3, AnewtXHTMLHeader4, AnewtXHTMLHeader5, AnewtXHTMLHeader6, AnewtXHTMLAnchor, AnewtXHTMLLink, AnewtXHTMLBase, AnewtXHTMLImage, AnewtXHTMLScript, AnewtXHTMLMeta, AnewtXHTMLTitle, AnewtXHTMLStyle, AnewtXHTMLTable, AnewtXHTMLTableHead, AnewtXHTMLTableFoot, AnewtXHTMLTableBody, AnewtXHTMLTableColumnGroup, AnewtXHTMLTableColumn, AnewtXHTMLTableRow, AnewtXHTMLTableCell, AnewtXHTMLTableHeaderCell, AnewtXHTMLEmphasis, AnewtXHTMLStrong, AnewtXHTMLDefinition, AnewtXHTMLCode, AnewtXHTMLSample, AnewtXHTMLKeyboard, AnewtXHTMLVariable, AnewtXHTMLCitation, AnewtXHTMLAbbreviation, AnewtXHTMLAcronym, AnewtXHTMLBlockQuote, AnewtXHTMLQuote, AnewtXHTMLSubscript, AnewtXHTMLSuperscript, AnewtXHTMLParagraph, AnewtXHTMLBreak, AnewtXHTMLPreformatted, AnewtXHTMLInsertion, AnewtXHTMLDeletion, AnewtXHTMLTeletype, AnewtXHTMLItalic, AnewtXHTMLBold, AnewtXHTMLBig, AnewtXHTMLSmall, AnewtXHTMLStrike, AnewtXHTMLUnderline, AnewtXMLDomDocument, AnewtXMLDomDocumentFragment, AnewtXMLDomText, AnewtXMLDomComment, and AnewtXMLDomRaw.
Definition at line 51 of file dom.lib.php.
AnewtXMLDomNode::$_attributes = null [protected] |
Hash of all attributes.
Reimplemented in AnewtXMLDomElement.
Definition at line 58 of file dom.lib.php.
| AnewtXMLDomNode::$owner_document = null |
The AnewtXMLDomDocument object associated with this node.
Definition at line 65 of file dom.lib.php.
| AnewtXMLDomNode::$child_nodes = array() |
| AnewtXMLDomNode::$parent_node = null |
1.5.9