put clear MPL2 license headers on all files
[php-utility-classes.git] / classes / document.php-class
index 41e817a4d96b678740e1fa0ca82591a886af529c..218ec3cfde4950d2475bc9b614a87769632d478e 100755 (executable)
@@ -1,23 +1,7 @@
 <?php
-/* ***** BEGIN LICENSE BLOCK *****
- *
- * The contents of this file are subject to Austrian copyright reegulations
- * ("Urheberrecht"); you may not use this file except in compliance with
- * those laws.
- * This contents and any derived work, if it gets distributed in any way,
- * is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
- * either express or implied.
- *
- * The Original Code is KaiRo's extended DOM document classes.
- *
- * The Initial Developer of the Original Code is
- * KaiRo - Robert Kaiser.
- * Portions created by the Initial Developer are Copyright (C) 2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Robert Kaiser <kairo@kairo.at>
- *
- * ***** END LICENSE BLOCK ***** */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 class ExtendedDocument extends DOMDocument {
   // ExtendedDocument PHP class
@@ -140,10 +124,6 @@ class ExtendedDocument extends DOMDocument {
   //   appends an ExtendedDocument::createElementJSFile() as a child of this document (see there for params)
   //     returns the new child
   //
-  // public function appendCOMElement($module, $attributes)
-  //   appends an ExtendedDocument::createCOMElement() as a child of this document (see there for params)
-  //     returns the new child
-  //
   // public function createElementLink($target, [$value])
   //   returns an ExtendedElement that is an HTML <a> with the given target (href) and (optional) value
   //
@@ -210,10 +190,6 @@ class ExtendedDocument extends DOMDocument {
   //
   // public function createElementJSFile($jsURL)
   //   returns an ExtendedElement that is an HTML <script> of JavaScript type linking to the file given by the URL
-  //
-  // public function createCOMElement($module, $attributes)
-  //   returns an ExtendedElement that is in COM_NS namespace, with the given module as name and the
-  //     given name=>value array as attributes
 
   function __construct($version = '1.0', $encoding = 'utf-8') {
     // make sure the default DOMDocument constructor runs
@@ -318,9 +294,6 @@ class ExtendedDocument extends DOMDocument {
   public function appendJSFile($jsdata) {
     return $this->appendChild($this->createElementJSFile($jsdata));
   }
-  public function appendCOMElement($module, $attributes) {
-    return $this->appendChild($this->createCOMElement($module, $attributes));
-  }
 
   public function appendHTMLMarkup($htmldata, $parentNode = null) {
     if (is_null($parentNode)) { $parentNode =& $this; }
@@ -512,16 +485,6 @@ class ExtendedDocument extends DOMDocument {
     $jselem->setAttribute('src', $jsURL);
     return $jselem;
   }
-
-  public function createCOMElement($module, $attributes) {
-    $com_elem = $this->createElementNS(COM_NS, $module);
-    if (is_array($attributes) && count($attributes)) {
-      foreach ($attributes as $name=>$value) {
-        $com_elem->setAttribute($name, $value);
-      }
-    }
-    return $com_elem;
-  }
 }
 
 class ExtendedElement extends DOMElement {
@@ -633,12 +596,8 @@ class ExtendedElement extends DOMElement {
   //   appends an ExtendedDocument::createElementJS() as a child of this element (see there for params)
   //     NO return value!
   //
-  // public function appendCOMElement($module, $attributes)
-  //   appends an ExtendedDocument::createCOMElement() as a child of this element (see there for params)
-  //     returns the new child
-  //
-  // public function appendCOMElement($module, $attributes)
-  //   appends an ExtendedDocument::createCOMElement() as a child of this element (see there for params)
+  // public function appendJSFile($jsURL)
+  //   appends an ExtendedDocument::createElementJSFile() as a child of this element (see there for params)
   //     returns the new child
 
   public function appendElement($name, $value = '') {
@@ -725,9 +684,6 @@ class ExtendedElement extends DOMElement {
   public function appendJSFile($jsdata) {
     return $this->appendChild($this->ownerDocument->createElementJSFile($jsdata));
   }
-  public function appendCOMElement($module, $attributes) {
-    return $this->appendChild($this->ownerDocument->createCOMElement($module, $attributes));
-  }
 }
 
 class ExtendedDocumentFragment extends DOMDocumentFragment {
@@ -839,12 +795,8 @@ class ExtendedDocumentFragment extends DOMDocumentFragment {
   //   appends an ExtendedDocument::createElementJS() as a child of this fragment (see there for params)
   //     NO return value!
   //
-  // public function appendCOMElement($module, $attributes)
-  //   appends an ExtendedDocument::createCOMElement() as a child of this fragment (see there for params)
-  //     returns the new child
-  //
-  // public function appendCOMElement($module, $attributes)
-  //   appends an ExtendedDocument::createCOMElement() as a child of this fragment (see there for params)
+  // public function appendJSFile($jsURL)
+  //   appends an ExtendedDocument::createElementJSFile() as a child of this fragment (see there for params)
   //     returns the new child
 
   public function appendElement($name, $value = '') {
@@ -931,8 +883,5 @@ class ExtendedDocumentFragment extends DOMDocumentFragment {
   public function appendJSFile($jsdata) {
     return $this->appendChild($this->ownerDocument->createElementJSFile($jsdata));
   }
-  public function appendCOMElement($module, $attributes) {
-    return $this->appendChild($this->ownerDocument->createCOMElement($module, $attributes));
-  }
 }
 ?>