diff options
author | xue <> | 2005-12-07 00:32:29 +0000 |
---|---|---|
committer | xue <> | 2005-12-07 00:32:29 +0000 |
commit | b4e9f6795206fab6b952f814ccf812677a34c635 (patch) | |
tree | e3be7c6031cd947f233d9e6cbcdec813e391f5ef /framework/Web | |
parent | ec46fdc945f591e910051aca0457097825afd34c (diff) |
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/THttpRequest.php | 23 | ||||
-rw-r--r-- | framework/Web/THttpResponse.php | 25 | ||||
-rw-r--r-- | framework/Web/THttpSession.php | 24 | ||||
-rw-r--r-- | framework/Web/UI/TAssetManager.php | 24 | ||||
-rw-r--r-- | framework/Web/UI/TTemplateManager.php | 24 | ||||
-rw-r--r-- | framework/Web/UI/TThemeManager.php | 23 |
6 files changed, 16 insertions, 127 deletions
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php index 80e87d15..0c21a020 100644 --- a/framework/Web/THttpRequest.php +++ b/framework/Web/THttpRequest.php @@ -29,7 +29,7 @@ * @package System.Web
* @since 3.0
*/
-class THttpRequest extends TComponent implements IModule
+class THttpRequest extends TModule
{
/**
* GET variable name to store service information
@@ -40,10 +40,6 @@ class THttpRequest extends TComponent implements IModule */
private $_initialized=false;
/**
- * @var string module ID
- */
- private $_id;
- /**
* @var string requested service ID
*/
private $_serviceID=null;
@@ -76,6 +72,7 @@ class THttpRequest extends TComponent implements IModule */
public function init($application,$config)
{
+ parent::init($application,$config);
// Info about server variables:
// PHP_SELF contains real URI (w/ path info, w/o query string)
// SCRIPT_NAME is the real URI for the requested script (w/o path info and query string)
@@ -125,22 +122,6 @@ class THttpRequest extends TComponent implements IModule }
/**
- * @return string id of this module
- */
- public function getID()
- {
- return $this->_id;
- }
-
- /**
- * @param string id of this module
- */
- public function setID($value)
- {
- $this->_id=$value;
- }
-
- /**
* @return TUri the request URL
*/
public function getUrl()
diff --git a/framework/Web/THttpResponse.php b/framework/Web/THttpResponse.php index dfa2d023..ad290fb0 100644 --- a/framework/Web/THttpResponse.php +++ b/framework/Web/THttpResponse.php @@ -37,13 +37,9 @@ * @package System.Web
* @since 3.0
*/
-class THttpResponse extends TComponent implements IModule, ITextWriter
+class THttpResponse extends TModule implements ITextWriter
{
/**
- * @var string id of this module (response)
- */
- private $_id;
- /**
* @var boolean whether to buffer output
*/
private $_bufferOutput=true;
@@ -84,6 +80,8 @@ class THttpResponse extends TComponent implements IModule, ITextWriter */
public function init($application,$config)
{
+ parent::init($application,$config);
+
if($this->_bufferOutput)
ob_start();
$this->_initialized=true;
@@ -91,23 +89,6 @@ class THttpResponse extends TComponent implements IModule, ITextWriter }
/**
- * @return string id of this module
- */
- public function getID()
- {
- return $this->_id;
- }
-
- /**
- * @param string id of this module
- */
- public function setID($value)
- {
- $this->_id=$value;
- }
-
-
- /**
* @return integer time-to-live for cached session pages in minutes, this has no effect for nocache limiter. Defaults to 180.
*/
public function getCacheExpire()
diff --git a/framework/Web/THttpSession.php b/framework/Web/THttpSession.php index 5afcfb7a..0698d4d8 100644 --- a/framework/Web/THttpSession.php +++ b/framework/Web/THttpSession.php @@ -54,13 +54,9 @@ * @package System.Web
* @since 3.0
*/
-class THttpSession extends TComponent implements IModule
+class THttpSession extends TModule
{
/**
- * @var string ID of this module
- */
- private $_id;
- /**
* @var THttpSessionCollection list of session variables
*/
private $_items;
@@ -89,6 +85,8 @@ class THttpSession extends TComponent implements IModule */
public function init($application,$config)
{
+ parent::init($application,$config);
+
if($this->_autoStart)
session_start();
$this->_initialized=true;
@@ -134,22 +132,6 @@ class THttpSession extends TComponent implements IModule }
/**
- * @return string the ID of this session module (not session ID)
- */
- public function getID()
- {
- return $this->_id;
- }
-
- /**
- * @param string the ID of this session module (not session ID)
- */
- public function setID($value)
- {
- $this->_id=$value;
- }
-
- /**
* @return THttpSessionCollection list of session variables
*/
public function getItems()
diff --git a/framework/Web/UI/TAssetManager.php b/framework/Web/UI/TAssetManager.php index 0f96ae90..df189b58 100644 --- a/framework/Web/UI/TAssetManager.php +++ b/framework/Web/UI/TAssetManager.php @@ -41,7 +41,7 @@ * @package System.Web.UI
* @since 3.0
*/
-class TAssetManager extends TComponent implements IModule
+class TAssetManager extends TModule
{
/**
* Default web accessible base path for storing private files
@@ -56,10 +56,6 @@ class TAssetManager extends TComponent implements IModule */
private $_baseUrl=null;
/**
- * @var string module ID
- */
- private $_id='asset';
- /**
* @var boolean whether to use timestamp checking to ensure files are published with up-to-date versions.
*/
private $_checkTimestamp=false;
@@ -80,6 +76,8 @@ class TAssetManager extends TComponent implements IModule */
public function init($application,$config)
{
+ parent::init($application,$config);
+
$this->_application=$application;
if($this->_basePath===null)
$this->_basePath=dirname($application->getRequest()->getPhysicalApplicationPath()).'/'.self::DEFAULT_BASEPATH;
@@ -91,22 +89,6 @@ class TAssetManager extends TComponent implements IModule }
/**
- * @return string id of this module
- */
- public function getID()
- {
- return $this->_id;
- }
-
- /**
- * @param string id of this module
- */
- public function setID($value)
- {
- $this->_id=$value;
- }
-
- /**
* @return string the root directory storing published asset files
*/
public function getBasePath()
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index 1f3044a2..6864e038 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -27,7 +27,7 @@ * @package System.Web.UI
* @since 3.0
*/
-class TTemplateManager extends TComponent implements IModule
+class TTemplateManager extends TModule
{
/**
* Template file extension
@@ -41,10 +41,6 @@ class TTemplateManager extends TComponent implements IModule * @var TApplication application instance
*/
private $_application;
- /**
- * @var string module ID
- */
- private $_id;
/**
* Initializes the module.
@@ -55,27 +51,13 @@ class TTemplateManager extends TComponent implements IModule */
public function init($application,$config)
{
+ parent::init($application,$config);
+
$this->_application=$application;
$application->getService()->setTemplateManager($this);
}
/**
- * @return string id of this module
- */
- public function getID()
- {
- return $this->_id;
- }
-
- /**
- * @param string id of this module
- */
- public function setID($value)
- {
- $this->_id=$value;
- }
-
- /**
* Loads the template corresponding to the specified class name.
* @return ITemplate template for the class name, null if template doesn't exist.
*/
diff --git a/framework/Web/UI/TThemeManager.php b/framework/Web/UI/TThemeManager.php index 504e8ecb..746e36cb 100644 --- a/framework/Web/UI/TThemeManager.php +++ b/framework/Web/UI/TThemeManager.php @@ -36,17 +36,13 @@ * @package System.Web.UI
* @since 3.0
*/
-class TThemeManager extends TComponent implements IModule
+class TThemeManager extends TModule
{
/**
* default themes base path
*/
const DEFAULT_BASEPATH='themes';
/**
- * @var string module ID
- */
- private $_id='theme';
- /**
* @var boolean whether this module has been initialized
*/
private $_initialized=false;
@@ -71,28 +67,13 @@ class TThemeManager extends TComponent implements IModule */
public function init($application,$config)
{
+ parent::init($application,$config);
$this->_application=$application;
$this->_initialized=true;
$application->getService()->setThemeManager($this);
}
/**
- * @return string id of this module
- */
- public function getID()
- {
- return $this->_id;
- }
-
- /**
- * @param string id of this module
- */
- public function setID($value)
- {
- $this->_id=$value;
- }
-
- /**
* @param string name of the theme to be retrieved
* @return TTheme the theme retrieved
*/
|