33 if (self::$instance !== null) {
34 return self::$instance;
38 $storeType =
$config->getString(
'store.type', null);
39 if ($storeType === null) {
40 $storeType =
$config->getString(
'session.handler',
'phpsession');
46 self::$instance =
false;
49 self::$instance =
new Store\Memcache();
52 self::$instance =
new Store\SQL();
55 self::$instance =
new Store\Redis();
60 $className = Module::resolveClass($storeType,
'Store',
'\SimpleSAML\Store');
63 $c[
'store.type'] =
'phpsession';
65 "Invalid 'store.type' configuration option. Cannot find store '$storeType'.",
70 self::$instance =
new $className();
73 return self::$instance;
85 abstract public function get(
$type,
$key);
105 abstract public function delete(
$type,
$key);
Attribute-related utility methods.
static getInstance()
Retrieve our singleton instance.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.