From 5147906809d0fb77b75080da7fd0112a6f6f51f7 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 11 Nov 2005 04:11:42 +0000 Subject: Added Request, Response, Session, User properties to TControl. --- framework/Web/UI/TControl.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'framework') diff --git a/framework/Web/UI/TControl.php b/framework/Web/UI/TControl.php index 0d7fb333..ed6e7dd0 100644 --- a/framework/Web/UI/TControl.php +++ b/framework/Web/UI/TControl.php @@ -238,6 +238,38 @@ class TControl extends TComponent return Prado::getApplication(); } + /** + * @return THttpRequest the current user request + */ + public function getRequest() + { + return Prado::getApplication()->getRequest(); + } + + /** + * @return THttpResponse the response + */ + public function getResponse() + { + return Prado::getApplication()->getResponse(); + } + + /** + * @return THttpSession user session + */ + public function getSession() + { + return Prado::getApplication()->getSession(); + } + + /** + * @return IUser user + */ + public function getUser() + { + return Prado::getApplication()->getUser(); + } + /** * Returns the id of the control. * Control ID can be either manually set or automatically generated. -- cgit v1.2.3