summaryrefslogtreecommitdiff
path: root/framework/Web/THttpResponse.php
diff options
context:
space:
mode:
authorxue <>2005-11-22 22:23:25 +0000
committerxue <>2005-11-22 22:23:25 +0000
commit81b7d150b1c815cdd032c2b5795b6c4244e56ace (patch)
treeb7f3bb1968029ffa58dfea64a80cf0c2f9537d01 /framework/Web/THttpResponse.php
parent15d464c5b7182eb4c7a9e1b0180f6fe46401ed22 (diff)
Diffstat (limited to 'framework/Web/THttpResponse.php')
-rw-r--r--framework/Web/THttpResponse.php32
1 files changed, 32 insertions, 0 deletions
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