From 6c1b05deafd9940da5d473800032558df90b118e Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 16 Nov 2005 22:32:52 +0000 Subject: Key modules are now using registered to application rather than using reserved module names. --- framework/Web/THttpRequest.php | 45 +++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'framework/Web/THttpRequest.php') diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php index f87111ba..9be0db8a 100644 --- a/framework/Web/THttpRequest.php +++ b/framework/Web/THttpRequest.php @@ -67,6 +67,28 @@ class THttpRequest extends TComponent implements IModule * Analyzes and resolves user request. */ public function __construct() + { + } + + /** + * Strips slashes from input data. + * This method is applied when magic quotes is enabled. + * Do not call this method. + * @param mixed input data to be processed + * @param mixed processed data + */ + public function stripSlashes(&$data) + { + return is_array($data)?array_map(array($this,'stripSlashes'),$data):stripslashes($data); + } + + /** + * Initializes the module. + * This method is required by IModule and is invoked by application. + * @param IApplication application + * @param TXmlElement module configuration + */ + public function init($application,$config) { // Info about server variables: // PHP_SELF contains real URI (w/ path info, w/o query string) @@ -101,29 +123,8 @@ class THttpRequest extends TComponent implements IModule $this->_items=new TMap(array_merge($_POST,$_GET)); $this->resolveRequest(); - } - - /** - * Strips slashes from input data. - * This method is applied when magic quotes is enabled. - * Do not call this method. - * @param mixed input data to be processed - * @param mixed processed data - */ - public function stripSlashes(&$data) - { - return is_array($data)?array_map(array($this,'stripSlashes'),$data):stripslashes($data); - } - - /** - * Initializes the module. - * This method is required by IModule and is invoked by application. - * @param IApplication application - * @param TXmlElement module configuration - */ - public function init($application,$config) - { $this->_initialized=true; + $application->setRequest($this); } /** -- cgit v1.2.3