|
| get ($type, $key) |
| Retrieve a value from the data store. More...
|
|
| set ($type, $key, $value, $expire=null) |
| Save a value to the data store. More...
|
|
| delete ($type, $key) |
| Delete a value from the data store. More...
|
|
Definition at line 12 of file Store.php.
◆ delete()
SimpleSAML\Store::delete |
( |
|
$type, |
|
|
|
$key |
|
) |
| |
|
abstract |
Delete a value from the data store.
- Parameters
-
string | $type | The data type. |
string | $key | The key. |
◆ get()
SimpleSAML\Store::get |
( |
|
$type, |
|
|
|
$key |
|
) |
| |
|
abstract |
Retrieve a value from the data store.
- Parameters
-
string | $type | The data type. |
string | $key | The key. |
- Returns
- mixed|null The value.
◆ getInstance()
static SimpleSAML\Store::getInstance |
( |
| ) |
|
|
static |
Retrieve our singleton instance.
- Returns
- false| The data store, or false if it isn't enabled.
- Exceptions
-
Definition at line 31 of file Store.php.
References $config, $expire, $key, $type, and SimpleSAML_Configuration\getInstance().
Referenced by SimpleSAML\SessionHandler\__construct(), sspmod_saml_SP_LogoutStore\addSession(), and sspmod_saml_IdP_SQLNameID\getStore().
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();
63 $c[
'store.type'] =
'phpsession';
64 throw new CriticalConfigurationError(
65 "Invalid 'store.type' configuration option. Cannot find store '$storeType'.",
70 self::$instance =
new $className();
73 return self::$instance;
static resolveClass($id, $type, $subclass=null)
Resolve module class.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
◆ set()
SimpleSAML\Store::set |
( |
|
$type, |
|
|
|
$key, |
|
|
|
$value, |
|
|
|
$expire = null |
|
) |
| |
|
abstract |
Save a value to the data store.
- Parameters
-
string | $type | The data type. |
string | $key | The key. |
mixed | $value | The value. |
int | null | $expire | The expiration time (unix timestamp), or null if it never expires. |
◆ $instance
SimpleSAML\Store::$instance |
|
staticprivate |
The documentation for this class was generated from the following file:
- libs/composer/vendor/simplesamlphp/simplesamlphp/lib/SimpleSAML/Store.php