diff options
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/TOutputCache.php | 8 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TSafeHtml.php | 6 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TTextProcessor.php | 6 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TXmlTransform.php | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/framework/Web/UI/WebControls/TOutputCache.php b/framework/Web/UI/WebControls/TOutputCache.php index c0747a11..294519da 100644 --- a/framework/Web/UI/WebControls/TOutputCache.php +++ b/framework/Web/UI/WebControls/TOutputCache.php @@ -478,14 +478,14 @@ class TOutputCache extends TControl implements INamingContainer $writer->write($this->_contents);
else if($this->_cacheAvailable)
{
- $textWriter=new TTextWriter;
-
+ $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
+
$stack=$this->getPage()->getCachingStack();
$stack->push($this);
- parent::render(new THtmlWriter($textWriter));
+ parent::render($htmlWriter);
$stack->pop();
- $content=$textWriter->flush();
+ $content=$htmlWriter->flush();
$data=array($content,$this->_state,$this->_actions,time());
$this->_cache->set($this->getCacheKey(),$data,$this->getDuration(),$this->getCacheDependency());
$writer->write($content);
diff --git a/framework/Web/UI/WebControls/TSafeHtml.php b/framework/Web/UI/WebControls/TSafeHtml.php index d6829f8b..dba513c5 100644 --- a/framework/Web/UI/WebControls/TSafeHtml.php +++ b/framework/Web/UI/WebControls/TSafeHtml.php @@ -45,9 +45,9 @@ class TSafeHtml extends TControl */
public function render($writer)
{
- $textWriter=new TTextWriter;
- parent::render(new THtmlWriter($textWriter));
- $writer->write($this->parseSafeHtml($textWriter->flush()));
+ $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
+ parent::render($htmlWriter);
+ $writer->write($this->parseSafeHtml($htmlWriter->flush()));
}
/**
diff --git a/framework/Web/UI/WebControls/TTextProcessor.php b/framework/Web/UI/WebControls/TTextProcessor.php index 26dab754..3d900054 100644 --- a/framework/Web/UI/WebControls/TTextProcessor.php +++ b/framework/Web/UI/WebControls/TTextProcessor.php @@ -75,9 +75,9 @@ abstract class TTextProcessor extends TWebControl {
if(($text=$this->getText())==='' && $this->getHasControls())
{
- $textWriter=new TTextWriter;
- parent::renderContents(new THtmlWriter($textWriter));
- $text=$textWriter->flush();
+ $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
+ parent::renderContents($htmlWriter);
+ $text=$htmlWriter->flush();
}
if($text!=='')
$writer->write($this->processText($text));
diff --git a/framework/Web/UI/WebControls/TXmlTransform.php b/framework/Web/UI/WebControls/TXmlTransform.php index bb2c044f..d00ab974 100644 --- a/framework/Web/UI/WebControls/TXmlTransform.php +++ b/framework/Web/UI/WebControls/TXmlTransform.php @@ -169,10 +169,10 @@ class TXmlTransform extends TControl { */ public function render($writer) { if(($document=$this->getSourceXmlDocument()) === null) { - $textWriter = new TTextWriter(); - parent::render(new THtmlWriter($textWriter)); + $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter()); + parent::render($htmlWriter); $document = new DOMDocument(); - $document->loadXML($textWriter->flush()); + $document->loadXML($htmlWriter->flush()); } $stylesheet = $this->getTransformXmlDocument(); |