summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML/Store.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/SimpleSAML/Store.php')
-rw-r--r--lib/SimpleSAML/Store.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/SimpleSAML/Store.php b/lib/SimpleSAML/Store.php
index 134833f..9447c44 100644
--- a/lib/SimpleSAML/Store.php
+++ b/lib/SimpleSAML/Store.php
@@ -48,7 +48,12 @@ abstract class SimpleSAML_Store {
self::$instance = new SimpleSAML_Store_SQL();
break;
default:
- throw new SimpleSAML_Error_Exception('Unknown datastore type: ' . var_export($storeType, TRUE));
+ if (strpos($storeType, ':') === FALSE) {
+ throw new SimpleSAML_Error_Exception('Unknown datastore type: ' . var_export($storeType, TRUE));
+ }
+ /* Datastore from module. */
+ $className = SimpleSAML_Module::resolveClass($storeType, 'Store', 'SimpleSAML_Store');
+ self::$instance = new $className();
}
return self::$instance;