summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php')
-rwxr-xr-xframework/Web/UI/ActiveControls/TCallbackResponseAdapter.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php b/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php
index 922e6cc6..6e3fb01e 100755
--- a/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php
+++ b/framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php
@@ -37,6 +37,8 @@ class TCallbackResponseAdapter extends THttpResponseAdapter
*/
private $_data;
+ private $_redirectUrl=null;
+
/**
* Returns a new instance of THtmlWriter.
* An instance of TCallbackResponseWriter is created to hold the content.
@@ -75,6 +77,25 @@ class TCallbackResponseAdapter extends THttpResponseAdapter
{
return $this->_data;
}
+
+ /**
+ * Delay the redirect until we process the rest of the page.
+ * @param string new url to redirect to.
+ */
+ public function httpRedirect($url)
+ {
+ if($url[0]==='/')
+ $url=$this->getRequest()->getBaseUrl().$url;
+ $this->_redirectUrl=str_replace('&','&',$url);
+ }
+
+ /**
+ * @return string new url for callback response to redirect to.
+ */
+ public function getRedirectedUrl()
+ {
+ return $this->_redirectUrl;
+ }
}
/**