// appends a DOMDocument::createTextNode() as a child of this document (see there for params)
// returns the new child
//
+ // public function appendLinebreak()
+ // appends a <br> as a child of this document
+ // 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 appendText($text) {
return $this->appendChild($this->createTextNode($text));
}
+ public function appendLinebreak() {
+ return $this->appendChild($this->createElement('br'));
+ }
public function appendEntity($name) {
return $this->appendChild($this->createEntityReference($name));
}
}
public function createElementLink($target, $value = '') {
- $link = $this->createElement('a', $value);
+ $link = $this->createElement('a', (strlen($value) ? $value : $target));
$link->setAttribute('href', $target); // XXX: take care of & etc. in links
return $link;
}
// appends a DOMDocument::createTextNode() as a child of this element (see there for params)
// returns the new child
//
+ // public function appendLinebreak()
+ // appends a <br> as a child of this element
+ // 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 appendText($text) {
return $this->appendChild($this->ownerDocument->createTextNode($text));
}
+ public function appendLinebreak() {
+ return $this->appendChild($this->ownerDocument->createElement('br'));
+ }
public function appendEntity($name) {
return $this->appendChild($this->ownerDocument->createEntityReference($name));
}
// appends a DOMDocument::createTextNode() as a child of this fragment (see there for params)
// returns the new child
//
+ // public function appendLinebreak()
+ // appends a <br> as a child of this fragment
+ // 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 appendText($text) {
return $this->appendChild($this->ownerDocument->createTextNode($text));
}
+ public function appendLinebreak() {
+ return $this->appendChild($this->ownerDocument->createElement('br'));
+ }
public function appendEntity($name) {
return $this->appendChild($this->ownerDocument->createEntityReference($name));
}