From 81b7d150b1c815cdd032c2b5795b6c4244e56ace Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 22 Nov 2005 22:23:25 +0000 Subject: --- framework/Web/THttpResponse.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'framework/Web/THttpResponse.php') diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php index 58bbfb99..dfa2d023 100644 --- a/framework/Web/THttpResponse.php +++ b/framework/Web/THttpResponse.php @@ -59,6 +59,10 @@ class THttpResponse extends TComponent implements IModule, ITextWriter * @var integer response status code */ private $_status=200; + /** + * @var string HTML writer type + */ + private $_htmlWriterType='System.Web.UI.THtmlWriter'; /** * Destructor. @@ -303,6 +307,34 @@ class THttpResponse extends TComponent implements IModule, ITextWriter { setcookie($cookie->getName(),null,0,$cookie->getPath(),$cookie->getDomain(),$cookie->getSecure()); } + + /** + * @return string the type of HTML writer to be used, defaults to THtmlWriter + */ + public function getHtmlWriterType() + { + return $this->_htmlWriterType; + } + + /** + * @param string the type of HTML writer to be used, may be the class name or the namespace + */ + public function setHtmlWriterType($value) + { + $this->_htmlWriterType=$value; + } + + /** + * Creates a new instance of HTML writer. + * If the type of the HTML writer is not supplied, {@link getHtmlWriterType HtmlWriterType} will be assumed. + * @param string type of the HTML writer to be created. If null, {@link getHtmlWriterType HtmlWriterType} will be assumed. + */ + public function createHtmlWriter($type=null) + { + if($type===null) + $type=$this->_htmlWriterType; + return Prado::createComponent($type,$this); + } } ?> \ No newline at end of file -- cgit v1.2.3