summaryrefslogtreecommitdiff
path: root/framework/Data
diff options
context:
space:
mode:
authorxue <>2005-12-29 01:16:29 +0000
committerxue <>2005-12-29 01:16:29 +0000
commit7e0b0798997b197d57d09ef5e690afdb1e6a2712 (patch)
tree4b4b0901508713d49ddead72324ae60c8b56f1de /framework/Data
parentccdb91a35602377fe389c6c5b0945478929e0eca (diff)
Changed module init() method signature.
Diffstat (limited to 'framework/Data')
-rw-r--r--framework/Data/TMemCache.php6
-rw-r--r--framework/Data/TSqliteCache.php6
2 files changed, 4 insertions, 8 deletions
diff --git a/framework/Data/TMemCache.php b/framework/Data/TMemCache.php
index a34cd9a6..08f5e099 100644
--- a/framework/Data/TMemCache.php
+++ b/framework/Data/TMemCache.php
@@ -44,7 +44,7 @@
* Some usage examples of TMemCache are as follows,
* <code>
* $cache=new TMemCache; // TMemCache may also be loaded as a Prado application module
- * $cache->init();
+ * $cache->init(null);
* $cache->add('object',$object);
* $object2=$cache->get('object');
* </code>
@@ -105,10 +105,8 @@ class TMemCache extends TModule implements ICache
* @param TXmlElement configuration for this module, can be null
* @throws TConfigurationException if memcache extension is not installed or memcache sever connection fails
*/
- public function init($config=null)
+ public function init($config)
{
- parent::init($config);
-
if(!extension_loaded('memcache'))
throw new TConfigurationException('memcache_extension_required');
$this->_cache=new Memcache;
diff --git a/framework/Data/TSqliteCache.php b/framework/Data/TSqliteCache.php
index d2955ccd..07cd91e0 100644
--- a/framework/Data/TSqliteCache.php
+++ b/framework/Data/TSqliteCache.php
@@ -47,7 +47,7 @@
* <code>
* $cache=new TSqliteCache; // TSqliteCache may also be loaded as a Prado application module
* $cache->setDbFile($dbFilePath);
- * $cache->init();
+ * $cache->init(null);
* $cache->add('object',$object);
* $object2=$cache->get('object');
* </code>
@@ -113,10 +113,8 @@ class TSqliteCache extends TModule implements ICache
* @throws TConfigurationException if sqlite extension is not installed,
* DbFile is set invalid, or any error happens during creating database or cache table.
*/
- public function init($config=null)
+ public function init($config)
{
- parent::init($config);
-
if(!function_exists('sqlite_open'))
throw new TConfigurationException('sqlitecache_extension_required');
if($this->_file===null)