[pLog-svn] r659 - plog/trunk/class/config
subaochen at devel.plogworld.net
subaochen at devel.plogworld.net
Tue Jan 4 04:57:17 GMT 2005
Author: subaochen
Date: 2005-01-04 04:57:17 +0000 (Tue, 04 Jan 2005)
New Revision: 659
Modified:
plog/trunk/class/config/config.class.php
Log:
getConfig method should remember all kinds of config type, such as file, db, ldap and etc ?
Modified: plog/trunk/class/config/config.class.php
===================================================================
--- plog/trunk/class/config/config.class.php 2005-01-04 01:14:14 UTC (rev 658)
+++ plog/trunk/class/config/config.class.php 2005-01-04 04:57:17 UTC (rev 659)
@@ -50,7 +50,7 @@
);
// check if there was an instance of the Config class already created
- if( !isset($configInstance)) {
+ if( !isset($configInstance[$storage])) {
// now we have to instantiate the right storage class
if( $storage == "" || !array_key_exists( $storage, $storageTypes )) {
// there is no class to implement this storage method, so we quite
@@ -63,11 +63,11 @@
$className = $storageTypes[$storage];
include_once( PLOG_CLASS_PATH.'class/config/'.strtolower($className).'.class.php' );
// and create an object
- $configInstance = new $className( $params );
+ $configInstance[$storage] = new $className( $params );
}
// return the instance
- return $configInstance;
+ return $configInstance[$storage];
}
}
?>
More information about the pLog-svn
mailing list