Skip to content

Commit 35b44f4

Browse files
committed
Added 'append' method
1 parent 503d4ca commit 35b44f4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Xml/QuipXmlElement.php

+15
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,21 @@ public function after($content) {
9292
return $this;
9393
}
9494

95+
/**
96+
* Add the content at the end of this node.
97+
* @param mixed $content
98+
* @return \QuipXml\Xml\QuipXmlElement
99+
*/
100+
public function append($content) {
101+
if (FALSE === (bool) $this) {
102+
return $this;
103+
}
104+
$me = $this->dom();
105+
$new = $this->_contentToDom($content);
106+
$me->appendChild($new);
107+
return $this;
108+
}
109+
95110
/**
96111
* Add the content before this node.
97112
* @param int $index

0 commit comments

Comments
 (0)