Mercurial > defr > templates
comparison class.template.php @ 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 | 51645aad97a8 |
comparison
equal
deleted
inserted
replaced
10:04b1d6bca316 | 11:a7ce1a423cbe |
---|---|
97 $retVal = $this->xmlDocument->createTextNode($obj); | 97 $retVal = $this->xmlDocument->createTextNode($obj); |
98 else if($obj instanceof DOMDocument) | 98 else if($obj instanceof DOMDocument) |
99 $retVal = $obj->documentElement->clone(true); | 99 $retVal = $obj->documentElement->clone(true); |
100 else if($obj instanceof DOMNode) | 100 else if($obj instanceof DOMNode) |
101 $retVal = $obj->clone(true); | 101 $retVal = $obj->clone(true); |
102 else if($obj instanceof Template) { | |
103 $node = $obj->xmlDocument->documentElement; | |
104 $retVal = $this->xmlDocument->importNode($node, true); | |
105 } | |
102 return $retVal; | 106 return $retVal; |
103 } | 107 } |
104 | 108 |
105 function setParams($array) { | 109 function setParams($array) { |
106 foreach($array as $selector => $obj) { | 110 foreach($array as $selector => $obj) { |