Inheritance diagram for XmlHelper:

Public Member Functions | |
| __construct () | |
| addNs ($name, $url=null) | |
| closeElem () | |
| elem ($name, $attrib=array(), $content=null, $endTag=true) | |
| header ($attrib=array()) | |
| removeNs ($name) | |
| serialize ($data, $options=array()) | |
Public Attributes | |
| $encoding = 'UTF-8' | |
Definition at line 35 of file xml.php.
| XmlHelper::__construct | ( | ) |
Constructor
Reimplemented from Overloadable.
Definition at line 47 of file xml.php.
References __construct().
| XmlHelper::addNs | ( | $ | name, | |
| $ | url = null | |||
| ) |
Adds a namespace to any documents generated
| string | $name The namespace name | |
| string | $url The namespace URI; can be empty if in the default namespace map |
Definition at line 82 of file xml.php.
References $url.
| XmlHelper::closeElem | ( | ) |
Create closing tag for current element
Definition at line 140 of file xml.php.
References Helper::output().
| XmlHelper::elem | ( | $ | name, | |
| $ | attrib = array(), |
|||
| $ | content = null, |
|||
| $ | endTag = true | |||
| ) |
Generates an XML element
| string | $name The name of the XML element | |
| array | $attrib The attributes of the XML element | |
| mixed | $content XML element content | |
| boolean | $endTag Whether the end tag of the element should be printed |
Definition at line 104 of file xml.php.
References $out, Helper::output(), and Helper::value().
Referenced by RssHelper::channel(), RssHelper::document(), and RssHelper::item().
| XmlHelper::header | ( | $ | attrib = array() |
) |
Returns an XML document header
| array | $attrib Header tag attributes |
Definition at line 58 of file xml.php.
References Helper::output(), and Configure::read().
Referenced by serialize().
| XmlHelper::removeNs | ( | $ | name | ) |
Removes a namespace added in addNs()
| string | $name The namespace name or URI |
| XmlHelper::serialize | ( | $ | data, | |
| $ | options = array() | |||
| ) |
Serializes a model resultset into XML
| mixed | $data The content to be converted to XML | |
| array | $options The data formatting options. For a list of valid options, see XmlNode::__construct(). |
Definition at line 156 of file xml.php.
References Helper::$data, and header().
1.4.7