Source for file LTidyHttpResponseAdapter.php
Documentation is available at LTidyHttpResponseAdapter.php
* THttpResponseAdatper class
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @link http://www.pradosoft.com/
* @copyright Copyright © 2005 PradoSoft
* @license http://www.pradosoft.com/license/
* @package Phundament.Components
* THttpResponseAdapter class.
* THttpResponseAdapter allows the base http response class to change behaviour
* without change the class hierachy.
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @var THttpResponse the response object the adapter is attached.
* Constructor. Attach a response to be adapted.
* @param THttpResponse the response object the adapter is to attach to.
$this->_response= $response;
* @return THttpResponse the response object adapted.
* This method is invoked when the response flushes the content and headers.
* Default implementation calls the attached response flushContent method.
if (TPropertyValue::ensureBoolean($this->Application->Parameters['TidyOutput']) == true)
$tidy->parseString($buffer, $config, 'utf8');
#Prado::log($e->getMessage(), TLogger::WARNING, "Lithron.LTidyHttpResponseAdapter");
$this->_response->flushContent();
* This method is invoked when the response is to redirect to another page.
* @param string new url to redirect to.
$this->_response->httpRedirect($url);
* This method is invoked when a new HtmlWriter needs to be created.
* Default implementation calls the attached response createNewHtmlWriter method.
* @param string type of the HTML writer to be created.
* @param ITextWriter the writer responsible for holding the content.
return $this->_response->createNewHtmlWriter($type, $writer);
|