Skip to content
Snippets Groups Projects
Commit db595060 authored by Olav Morken's avatar Olav Morken
Browse files

SimpleSAML_Store: Add support for defining datastores in modules.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2619 44740490-163a-0410-bde0-09ae8108e29a
parent a6f01377
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment