Inheritance diagram for XmlNode:

Public Member Functions | |
| __construct ($name=null, $value=null, $namespace=null) | |
| __killParent ($recursive=true) | |
| __tagOptions ($name, $option=null) | |
| __toString () | |
| addNamespace ($prefix, $url) | |
| & | append (&$child, $options=array()) |
| & | child ($id) |
| children ($name) | |
| cloneNode () | |
| compare ($node) | |
| & | createElement ($name=null, $value=null, $attributes=array(), $namespace=false) |
| & | createNode ($name=null, $value=null, $namespace=false) |
| & | createTextNode ($value=null) |
| & | document () |
| & | first () |
| hasChildren () | |
| & | last () |
| name () | |
| & | nextSibling () |
| normalize ($object, $keyName=null, $options=array()) | |
| & | parent () |
| & | previousSibling () |
| removeNamespace ($prefix) | |
| setParent (&$parent) | |
| toArray ($camelize=true) | |
| toString ($options=array(), $depth=0) | |
Public Attributes | |
| $__parent = null | |
| $attributes = array() | |
| $children = array() | |
| $name = null | |
| $namespace = null | |
| $namespaces = array() | |
| $value | |
Definition at line 37 of file xml.php.
| XmlNode::__construct | ( | $ | name = null, |
|
| $ | value = null, |
|||
| $ | namespace = null | |||
| ) |
Constructor.
| string | $name Node name | |
| array | $attributes Node attributes | |
| mixed | $value Node contents (text) | |
| array | $children Node children |
Definition at line 95 of file xml.php.
References $name, $namespace, $value, createTextNode(), name(), and normalize().
| XmlNode::__killParent | ( | $ | recursive = true |
) |
| XmlNode::__tagOptions | ( | $ | name, | |
| $ | option = null | |||
| ) |
Gets the tag-specific options for the given node name
| string | $name XML tag name | |
| string | $option The specific option to query. Omit for all options |
Definition at line 295 of file xml.php.
References $name.
Referenced by normalize().
| XmlNode::__toString | ( | ) |
| XmlNode::addNamespace | ( | $ | prefix, | |
| $ | url | |||
| ) |
Adds a namespace to the current node
| string | $prefix The namespace prefix | |
| string | $url The namespace DTD URL |
Reimplemented in Xml.
Definition at line 121 of file xml.php.
References $url, and Xml::addGlobalNs().
Referenced by XmlElement::addAttribute().
| & XmlNode::append | ( | &$ | child, | |
| $ | options = array() | |||
| ) |
Append given node as a child.
| object | $child XmlNode with appended child | |
| array | $options XML generator options for objects and arrays |
Definition at line 383 of file xml.php.
References $attributes, a(), compare(), createNode(), Set::map(), and normalize().
| & XmlNode::child | ( | $ | id | ) |
| XmlNode::children | ( | $ | name | ) |
| XmlNode::cloneNode | ( | ) |
| XmlNode::compare | ( | $ | node | ) |
| & XmlNode::createElement | ( | $ | name = null, |
|
| $ | value = null, |
|||
| $ | attributes = array(), |
|||
| $ | namespace = false | |||
| ) |
Creates an XmlElement object that can be appended to this document or a node in it
| string | $name Element name | |
| string | $value Element value | |
| array | $attributes Element attributes | |
| string | $namespace Node namespace |
Definition at line 163 of file xml.php.
References $attributes, $name, $namespace, and $value.
Referenced by normalize().
| & XmlNode::createNode | ( | $ | name = null, |
|
| $ | value = null, |
|||
| $ | namespace = false | |||
| ) |
Creates an XmlNode object that can be appended to this document or a node in it
| string | $name Node name | |
| string | $value Node value | |
| string | $namespace Node namespace |
Definition at line 149 of file xml.php.
References $name, $namespace, and $value.
Referenced by Xml::__construct(), and append().
| & XmlNode::createTextNode | ( | $ | value = null |
) |
Creates an XmlTextNode object that can be appended to this document or a node in it
| string | $value Node value |
Definition at line 174 of file xml.php.
References $value.
Referenced by __construct().
| & XmlNode::document | ( | ) |
Returns the XML document to which this node belongs
Definition at line 552 of file xml.php.
Referenced by Xml::__construct().
| & XmlNode::first | ( | ) |
Returns first child node, or null if empty.
Definition at line 435 of file xml.php.
References children().
| XmlNode::hasChildren | ( | ) |
| & XmlNode::last | ( | ) |
Returns last child node, or null if empty.
Definition at line 449 of file xml.php.
References children().
| XmlNode::name | ( | ) |
Returns the fully-qualified XML node name, with namespace
public
Definition at line 319 of file xml.php.
References XmlManager::getInstance(), and return.
Referenced by __construct(), child(), children(), and normalize().
| & XmlNode::nextSibling | ( | ) |
| XmlNode::normalize | ( | $ | object, | |
| $ | keyName = null, |
|||
| $ | options = array() | |||
| ) |
Gets the XML element properties from an object.
| object | $object Object to get properties from |
Definition at line 186 of file xml.php.
References $attributes, $children, $name, $namespace, __tagOptions(), children(), createElement(), name(), slug(), and underscore().
Referenced by __construct(), and append().
| & XmlNode::parent | ( | ) |
| & XmlNode::previousSibling | ( | ) |
| XmlNode::removeNamespace | ( | $ | prefix | ) |
Adds a namespace to the current node
| string | $prefix The namespace prefix | |
| string | $url The namespace DTD URL |
Reimplemented in Xml.
Definition at line 135 of file xml.php.
References Xml::removeGlobalNs().
| XmlNode::setParent | ( | &$ | parent | ) |
| XmlNode::toArray | ( | $ | camelize = true |
) |
Return array representation of current object.
| boolean | $camelize true will camelize child nodes, false will not alter node names |
Definition at line 663 of file xml.php.
References $out, camelize(), and name().
| XmlNode::toString | ( | $ | options = array(), |
|
| $ | depth = 0 | |||
| ) |
Returns this XML structure as a string.
Reimplemented in XmlTextNode.
Definition at line 580 of file xml.php.
References name(), and Xml::options().
| XmlNode::$attributes = array() |
Definition at line 72 of file xml.php.
Referenced by XmlElement::__construct(), append(), createElement(), and normalize().
| XmlNode::$children = array() |
| XmlNode::$name = null |
Reimplemented in XmlTextNode.
Definition at line 44 of file xml.php.
Referenced by XmlElement::__construct(), __construct(), __tagOptions(), XmlElement::addAttribute(), children(), createElement(), createNode(), and normalize().
| XmlNode::$namespace = null |
Definition at line 51 of file xml.php.
Referenced by XmlElement::__construct(), __construct(), createElement(), createNode(), and normalize().
| XmlNode::$value |
Reimplemented in XmlTextNode.
Definition at line 65 of file xml.php.
Referenced by XmlElement::__construct(), __construct(), createElement(), createNode(), and createTextNode().
1.4.7