diff options
Diffstat (limited to 'framework/Data')
-rw-r--r-- | framework/Data/TMemCache.php | 24 | ||||
-rw-r--r-- | framework/Data/TSqliteCache.php | 24 |
2 files changed, 6 insertions, 42 deletions
diff --git a/framework/Data/TMemCache.php b/framework/Data/TMemCache.php index b78014fb..d50c5b9d 100644 --- a/framework/Data/TMemCache.php +++ b/framework/Data/TMemCache.php @@ -62,7 +62,7 @@ * @package System.Data
* @since 3.0
*/
-class TMemCache extends TComponent implements IModule, ICache
+class TMemCache extends TModule implements ICache
{
/**
* @var boolean if the module is initialized
@@ -84,10 +84,6 @@ class TMemCache extends TComponent implements IModule, ICache * @var integer the port number of the memcache server
*/
private $_port=11211;
- /**
- * @var string ID of this module
- */
- private $_id='';
/**
* Destructor.
@@ -111,6 +107,8 @@ class TMemCache extends TComponent implements IModule, ICache */
public function init($application,$config)
{
+ parent::init($application,$config);
+
if(!extension_loaded('memcache'))
throw new TConfigurationException('memcache_extension_required');
$this->_cache=new Memcache;
@@ -123,22 +121,6 @@ class TMemCache extends TComponent implements IModule, ICache }
/**
- * @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 host name of the memcache server
*/
public function getHost()
diff --git a/framework/Data/TSqliteCache.php b/framework/Data/TSqliteCache.php index 5eb692d4..13455849 100644 --- a/framework/Data/TSqliteCache.php +++ b/framework/Data/TSqliteCache.php @@ -64,7 +64,7 @@ * @package System.Data
* @since 3.0
*/
-class TSqliteCache extends TComponent implements IModule, ICache
+class TSqliteCache extends TModule implements ICache
{
/**
* name of the table storing cache data
@@ -91,10 +91,6 @@ class TSqliteCache extends TComponent implements IModule, ICache * @var string the database file name
*/
private $_file=null;
- /**
- * @var string id of this module
- */
- private $_id='';
/**
* Destructor.
@@ -119,6 +115,8 @@ class TSqliteCache extends TComponent implements IModule, ICache */
public function init($application,$config)
{
+ parent::init($application,$config);
+
if(!function_exists('sqlite_open'))
throw new TConfigurationException('sqlitecache_extension_required');
if($this->_file===null)
@@ -142,22 +140,6 @@ class TSqliteCache extends TComponent implements IModule, ICache }
/**
- * @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 database file path (in namespace form)
*/
public function getDbFile()
|