From ae41c41b1625ce16efdbb919df085658b3e5fc15 Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Sat, 24 Apr 2010 02:10:31 +0200 Subject: [PATCH] move all of domain to new methods of ExtendedDocument and improve those classes for all cases needed in there (one createElementNS excepted) --- include/cbsm/util/document.php-class | 247 ++++++++++++++++++++++++--- 1 file changed, 224 insertions(+), 23 deletions(-) diff --git a/include/cbsm/util/document.php-class b/include/cbsm/util/document.php-class index 07a635a..11ebf97 100755 --- a/include/cbsm/util/document.php-class +++ b/include/cbsm/util/document.php-class @@ -27,6 +27,12 @@ class ExtendedDocument extends DOMDocument { // CONSTRUCTOR // construct a new DOM Document that uses our element definitions // + // private $xmheader + // the default XML header + // + // private $xhtmldtype + // the XHTML doctype to use by default + // // function appendElement($name, [$value]) // appends a DOMDocument::createElement() as a child of this document (see there for params) // returns the new child @@ -40,26 +46,77 @@ class ExtendedDocument extends DOMDocument { // appends an ExtendedDocument::createElementLink() as a child of this document (see there for params) // returns the new child // + // function appendFormDiv($action, $method, $name) + // appends an ExtendedDocument::createElementForm() as a child of this document (see there for params) + // returns an HTML
that is a child of the new child + // + // function appendInputHidden($name, $value) + // appends an ExtendedDocument::createElementInputHidden() as a child of this document (see there for params) + // returns the new child + // + // function appendInputText($name, $maxlength, $size, [$id], [$value]) + // appends an ExtendedDocument::createElementInputText() as a child of this document (see there for params) + // returns the new child + // + // function appendInputRadio($name, $id, $value, $checked) + // appends an ExtendedDocument::createElementInputRadio() as a child of this document (see there for params) + // returns the new child + // + // function appendInputCheckbox($name, $id, $value, $checked) + // appends an ExtendedDocument::createElementInputCheckbox() as a child of this document (see there for params) + // returns the new child + // + // function appendInputSubmit($value) + // appends an ExtendedDocument::createElementInputSubmit() as a child of this document (see there for params) + // returns the new child + // + // function appendLabel($for_id, $value) + // appends an ExtendedDocument::createElementLabel() as a child of this document (see there for params) + // returns the new child + // // function appendText($text) // appends a DOMDocument::createTextNode() as a child of this document (see there for params) // returns the new child // - // function appendRawMarkup($markupdata) - // appends an ExtendedDocument::createElementRawMarkup() as a child of this document (see there for params) + // function appendHTMLMarkup($htmldata, [$parentNode]) + // appends a representation of the HTML data as children of the given parent node, by default this document + // NO return value! + // + // function appendXMLMarkup($xmldata, [$parentNode]) + // appends a representation of the XML data as children of the given parent node, by default this document // NO return value! // // function appendJSElement($jsdata) // appends an ExtendedDocument::createElementJS() as a child of this document (see there for params) // NO return value! // - // function createXMLFragment($xmldata) - // returns a DOMDocumentFragment containing the DOM of the given XML data - // // function createElementLink($target, [$value]) // returns an ExtendedElement that is an HTML with the given target (href) and (optional) value // - // function createElementRawMarkup($markupdata) - // returns a DOMNode containing a representation of the given raw markup data + // function createElementForm($action, $method, $name) + // returns an ExtendedElement that is an HTML
that is a child of an HTML
+ // with the given action, method, and name + // + // function createElementInputHidden($name, $value) + // returns an ExtendedElement that is an HTML of type 'hidden' with the given name and value + // + // function createElementInputText($name, $maxlength, $size, [$id], [$value]) + // returns an ExtendedElement that is an HTML of type 'text' with the given name, maxlength, size, + // and optionally id and value + // + // function createElementInputRadio($name, $id, $value, $checked) + // returns an ExtendedElement that is an HTML of type 'radio' with the given name, id, value and + // checked state + // + // function createElementInputCheckbox($name, $id, $value, $checked) + // returns an ExtendedElement that is an HTML of type 'checkbox' with the given name, id, value and + // checked state + // + // function createElementInputSubmit($value) + // returns an ExtendedElement that is an HTML of type 'submit' with the given name and value + // + // function createElementLabel($for_id, $value) + // returns an ExtendedElement that is an HTML