Mercurial > defr > templates
changeset 11:a7ce1a423cbe
Support de remplacement par une instance de Template.
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Sun, 21 Oct 2007 18:37:50 +0200 |
parents | 04b1d6bca316 |
children | 8a99fa4ea193 |
files | class.template.php |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/class.template.php Sun Oct 21 16:28:30 2007 +0200 +++ b/class.template.php Sun Oct 21 18:37:50 2007 +0200 @@ -99,6 +99,10 @@ $retVal = $obj->documentElement->clone(true); else if($obj instanceof DOMNode) $retVal = $obj->clone(true); + else if($obj instanceof Template) { + $node = $obj->xmlDocument->documentElement; + $retVal = $this->xmlDocument->importNode($node, true); + } return $retVal; }