projects
/
php-utility-classes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add appendEntity() function to ExtendedDocument - note that it only works for *named...
[php-utility-classes.git]
/
include
/
cbsm
/
util
/
document.php-class
diff --git
a/include/cbsm/util/document.php-class
b/include/cbsm/util/document.php-class
index 32d4e3ee23a715d281353d11f0b1c04024563e07..41e817a4d96b678740e1fa0ca82591a886af529c 100755
(executable)
--- a/
include/cbsm/util/document.php-class
+++ b/
include/cbsm/util/document.php-class
@@
-116,6
+116,10
@@
class ExtendedDocument extends DOMDocument {
// appends a DOMDocument::createTextNode() as a child of this document (see there for params)
// returns the new child
//
// appends a DOMDocument::createTextNode() as a child of this document (see there for params)
// returns the new child
//
+ // public function appendEntity($name)
+ // appends a DOMDocument::createEntityReference() as a child of this document (see there for params)
+ // returns the new child
+ //
// public function appendComment($comment_data)
// appends a DOMDocument::createComment() as a child of this document (see there for params)
// returns the new child
// public function appendComment($comment_data)
// appends a DOMDocument::createComment() as a child of this document (see there for params)
// returns the new child
@@
-302,6
+306,9
@@
class ExtendedDocument extends DOMDocument {
public function appendText($text) {
return $this->appendChild($this->createTextNode($text));
}
public function appendText($text) {
return $this->appendChild($this->createTextNode($text));
}
+ public function appendEntity($name) {
+ return $this->appendChild($this->createEntityReference($name));
+ }
public function appendComment($comment_data) {
return $this->appendChild($this->createComment($comment_data));
}
public function appendComment($comment_data) {
return $this->appendChild($this->createComment($comment_data));
}
@@
-606,6
+613,10
@@
class ExtendedElement extends DOMElement {
// appends a DOMDocument::createTextNode() as a child of this element (see there for params)
// returns the new child
//
// appends a DOMDocument::createTextNode() as a child of this element (see there for params)
// returns the new child
//
+ // public function appendEntity($name)
+ // appends a DOMDocument::createEntityReference() as a child of this element (see there for params)
+ // returns the new child
+ //
// public function appendComment($comment_data)
// appends a DOMDocument::createComment() as a child of this element (see there for params)
// returns the new child
// public function appendComment($comment_data)
// appends a DOMDocument::createComment() as a child of this element (see there for params)
// returns the new child
@@
-696,6
+707,9
@@
class ExtendedElement extends DOMElement {
public function appendText($text) {
return $this->appendChild($this->ownerDocument->createTextNode($text));
}
public function appendText($text) {
return $this->appendChild($this->ownerDocument->createTextNode($text));
}
+ public function appendEntity($name) {
+ return $this->appendChild($this->ownerDocument->createEntityReference($name));
+ }
public function appendComment($comment_data) {
return $this->appendChild($this->ownerDocument->createComment($comment_data));
}
public function appendComment($comment_data) {
return $this->appendChild($this->ownerDocument->createComment($comment_data));
}
@@
-805,6
+819,10
@@
class ExtendedDocumentFragment extends DOMDocumentFragment {
// appends a DOMDocument::createTextNode() as a child of this fragment (see there for params)
// returns the new child
//
// appends a DOMDocument::createTextNode() as a child of this fragment (see there for params)
// returns the new child
//
+ // public function appendEntity($name)
+ // appends a DOMDocument::createEntityReference() as a child of this fragment (see there for params)
+ // returns the new child
+ //
// public function appendComment($comment_data)
// appends a DOMDocument::createComment() as a child of this fragment (see there for params)
// returns the new child
// public function appendComment($comment_data)
// appends a DOMDocument::createComment() as a child of this fragment (see there for params)
// returns the new child
@@
-895,6
+913,9
@@
class ExtendedDocumentFragment extends DOMDocumentFragment {
public function appendText($text) {
return $this->appendChild($this->ownerDocument->createTextNode($text));
}
public function appendText($text) {
return $this->appendChild($this->ownerDocument->createTextNode($text));
}
+ public function appendEntity($name) {
+ return $this->appendChild($this->ownerDocument->createEntityReference($name));
+ }
public function appendComment($comment_data) {
return $this->appendChild($this->ownerDocument->createComment($comment_data));
}
public function appendComment($comment_data) {
return $this->appendChild($this->ownerDocument->createComment($comment_data));
}