+ //
+ // function appendCOMElement($module, $attributes)
+ // appends an ExtendedDocument::createCOMElement() as a child of this element (see there for params)
+ // returns the new child
+
+ function appendElement($name, $value = '') {
+ return $this->appendChild($this->ownerDocument->createElement($name, $value));
+ }
+ function appendElementXML($name, $xmldata) {
+ $aelem = $this->appendChild($this->ownerDocument->createElement($name));
+ $aelem->appendXMLMarkup($xmldata);
+ return $aelem;
+ }
+ function appendLink($target, $value = '') {
+ return $this->appendChild($this->ownerDocument->createElementLink($target, $value));
+ }
+ function appendFormDiv($action, $method, $name) {
+ $formelem = $this->appendChild($this->ownerDocument->createElementForm($action, $method, $name));
+ return $formelem->appendElement('div');
+ }
+ function appendInputHidden($name, $value) {
+ return $this->appendChild($this->ownerDocument->createElementInputHidden($name, $value));
+ }
+ function appendInputText($name, $maxlength, $size, $id = null, $value = null) {
+ return $this->appendChild($this->ownerDocument->createElementInputText($name, $maxlength, $size, $id, $value));
+ }
+ function appendInputRadio($name, $id, $value, $checked) {
+ return $this->appendChild($this->ownerDocument->createElementInputRadio($name, $id, $value, $checked));
+ }
+ function appendInputCheckbox($name, $id, $value, $checked) {
+ return $this->appendChild($this->ownerDocument->createElementInputCheckbox($name, $id, $value, $checked));
+ }
+ function appendInputSubmit($value) {
+ return $this->appendChild($this->ownerDocument->createElementInputSubmit($value));
+ }
+ function appendTextArea($name, $columns, $rows, $id = null, $value = null) {
+ return $this->appendChild($this->ownerDocument->createElementTextArea($name, $columns, $rows, $id, $value));
+ }
+ function appendElementSelect($name, $id = null, $options = array(), $default = null) {
+ return $this->appendChild($this->ownerDocument->createElementSelect($name, $id, $options, $default));
+ }
+ function appendElementOption($key, $desc, $selected = false) {
+ return $this->appendChild($this->ownerDocument->createElementOption($key, $desc, $selected));
+ }
+ function appendLabel($for_id, $value) {
+ return $this->appendChild($this->ownerDocument->createElementLabel($for_id, $value));
+ }
+ function appendText($text) {
+ return $this->appendChild($this->ownerDocument->createTextNode($text));
+ }
+ function appendHTMLMarkup($htmldata) {
+ $this->ownerDocument->appendHTMLMarkup($htmldata, $this);
+ }
+ function appendXMLMarkup($xmldata) {
+ $this->ownerDocument->appendXMLMarkup($xmldata, $this);
+ }
+ function appendJSElement($jsdata) {
+ $this->appendChild($this->ownerDocument->createElementJS($jsdata));
+ }
+ function appendCOMElement($module, $attributes) {
+ $this->appendChild($this->ownerDocument->createCOMElement($module, $attributes));
+ }
+}
+
+class ExtendedDocumentFragment extends DOMDocumentFragment {
+ // ExtendedDocumentFragment PHP class
+ // this extends the general PHP DOM Document Fragment class to simplify some usual constructs
+ //
+ // function appendElement($name, [$value])
+ // appends a DOMDocument::createElement() as a child of this fragment (see there for params)
+ // returns the new child
+ //
+ // function appendElementXML($name, $xmldata)
+ // appends a DOMDocument::createElement() with the given name as a child of this fragment,
+ // with an ExtendedDocument::createXMLFragment() of the given XML data inside
+ // returns the new child
+ //
+ // function appendLink($target, [$value])
+ // appends an ExtendedDocument::createElementLink() as a child of this fragment (see there for params)
+ // returns the new child
+ //
+ // function appendFormDiv($action, $method, $name)
+ // appends an ExtendedDocument::createElementForm() as a child of this fragment (see there for params)
+ // returns an HTML <div> that is a child of the new child
+ //
+ // function appendInputHidden($name, $value)
+ // appends an ExtendedDocument::createElementInputHidden() as a child of this fragment (see there for params)
+ // returns the new child
+ //
+ // function appendInputText($name, $maxlength, $size, [$id], [$value])
+ // appends an ExtendedDocument::createElementInputText() as a child of this fragment (see there for params)
+ // returns the new child
+ //
+ // function appendInputRadio($name, $id, $value, $checked)
+ // appends an ExtendedDocument::createElementInputRadio() as a child of this fragment (see there for params)
+ // returns the new child
+ //
+ // function appendInputCheckbox($name, $id, $value, $checked)
+ // appends an ExtendedDocument::createElementInputCheckbox() as a child of this fragment (see there for params)
+ // returns the new child
+ //
+ // function appendInputSubmit($value)
+ // appends an ExtendedDocument::createElementInputSubmit() as a child of this fragment (see there for params)
+ // returns the new child
+ //
+ // function appendTextArea($name, $columns, $rows, [$id], [$value])
+ // appends an ExtendedDocument::createElementTextArea() as a child of this fragment (see there for params)
+ // returns the new child
+ //
+ // function appendElementSelect($name, [$id], [$options], [$default])
+ // appends an ExtendedDocument::createElementSelect() as a child of this fragment (see there for params)
+ // returns the new child
+ //
+ // function appendElementOption($key, $desc, [$selected])
+ // appends an ExtendedDocument::createElementOption() as a child of this fragment (see there for params)
+ // returns the new child
+ //
+ // function appendLabel($for_id, $value)
+ // appends an ExtendedDocument::createElementLabel() as a child of this fragment (see there for params)
+ // returns the new child
+ //
+ // function appendText($text)
+ // appends a DOMDocument::createTextNode() as a child of this fragment (see there for params)
+ // returns the new child
+ //
+ // function appendHTMLMarkup($htmldata)
+ // appends a representation of the HTML data as children of this fragment
+ // NO return value!
+ //
+ // function appendXMLMarkup($xmldata)
+ // appends a representation of the XML data as children of this fragment
+ // NO return value!
+ //
+ // function appendJSElement($jsdata)
+ // appends an ExtendedDocument::createElementJS() as a child of this fragment (see there for params)
+ // NO return value!
+ //
+ // function appendCOMElement($module, $attributes)
+ // appends an ExtendedDocument::createCOMElement() as a child of this fragment (see there for params)
+ // returns the new child