From: Robert Kaiser Date: Fri, 22 Oct 2010 13:25:51 +0000 (+0200) Subject: Merge branch 'origin' X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=commitdiff_plain;h=f88289d7985a04283afff5cdaa81b0cd5449091e;hp=4a778b7ef1e4bf6e2aaa31a83280cd3efface400 Merge branch 'origin' --- diff --git a/include/cbsm/util/document.php-class b/include/cbsm/util/document.php-class new file mode 100755 index 0000000..e641d23 --- /dev/null +++ b/include/cbsm/util/document.php-class @@ -0,0 +1,615 @@ + + * + * ***** END LICENSE BLOCK ***** */ + +class ExtendedDocument extends DOMDocument { + // ExtendedDocument PHP class + // this extends the general PHP DOM Document class to simplify some usual constructs + // + // function __construct([$version], [$encoding]) + // 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 + // + // function appendElementXML($name, $xmldata) + // appends a DOMDocument::createElement() with the given name as a child of this document, + // 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 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 appendTextArea($name, $columns, $rows, [$id], [$value]) + // appends an ExtendedDocument::createElementTextArea() as a child of this document (see there for params) + // returns the new child + // + // function appendElementSelect($name, [$id], [$options], [$default]) + // appends an ExtendedDocument::createElementSelect() as a child of this document (see there for params) + // returns the new child + // + // function appendElementOption($key, $desc, [$selected]) + // appends an ExtendedDocument::createElementOption() 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 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 appendCOMElement($module, $attributes) + // appends an ExtendedDocument::createCOMElement() as a child of this document (see there for params) + // returns the new child + // + // function createElementLink($target, [$value]) + // returns an ExtendedElement that is an HTML with the given target (href) and (optional) value + // + // 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 createElementTextArea($name, $columns, $rows, [$id], [$value]) + // returns an ExtendedElement that is an HTML