Skip to content
Snippets Groups Projects
Commit 9d327f86 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fixes for lib/SimpleSAML/Store

parent 12d6eae2
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,8 @@ class Memcache extends Store
* @param string $type The data type.
* @param string $key The key.
* @param mixed $value The value.
* @param int|NULL $expire The expiration time (unix timestamp), or NULL if it never expires.
* @param int|null $expire The expiration time (unix timestamp), or NULL if it never expires.
* @return void
*/
public function set($type, $key, $value, $expire = null)
{
......@@ -73,6 +74,7 @@ class Memcache extends Store
*
* @param string $type The data type.
* @param string $key The key.
* @return void
*/
public function delete($type, $key)
{
......
......@@ -12,10 +12,12 @@ use \SimpleSAML\Store;
*/
class Redis extends Store
{
/** @var \Predis\Client */
public $redis;
/**
* Initialize the Redis data store.
* @param \Predis\Client|null $redis
*/
public function __construct($redis = null)
{
......@@ -87,6 +89,7 @@ class Redis extends Store
* @param string $key The key to insert.
* @param mixed $value The value itself.
* @param int|null $expire The expiration time (unix timestamp), or null if it never expires.
* @return void
*/
public function set($type, $key, $value, $expire = null)
{
......@@ -109,6 +112,7 @@ class Redis extends Store
*
* @param string $type The type of the data
* @param string $key The key to delete.
* @return void
*/
public function delete($type, $key)
{
......
......@@ -77,6 +77,7 @@ class SQL extends Store
/**
* Initialize the table-version table.
* @return void
*/
private function initTableVersionTable()
{
......@@ -100,6 +101,7 @@ class SQL extends Store
/**
* Initialize key-value table.
* @return void
*/
private function initKVTable()
{
......@@ -185,6 +187,7 @@ class SQL extends Store
*
* @param string $name Table name.
* @param int $version Table version.
* @return void
*/
public function setTableVersion($name, $version)
{
......@@ -208,6 +211,7 @@ class SQL extends Store
* @param string $table The table we should update.
* @param array $keys The key columns.
* @param array $data Associative array with columns.
* @return void
*/
public function insertOrUpdate($table, array $keys, array $data)
{
......@@ -266,6 +270,7 @@ class SQL extends Store
/**
* Clean the key-value table of expired entries.
* @return void
*/
private function cleanKVStore()
{
......@@ -329,6 +334,7 @@ class SQL extends Store
* @param string $key The key to insert.
* @param mixed $value The value itself.
* @param int|null $expire The expiration time (unix timestamp), or null if it never expires.
* @return void
*/
public function set($type, $key, $value, $expire = null)
{
......@@ -367,6 +373,7 @@ class SQL extends Store
*
* @param string $type The type of the data
* @param string $key The key to delete.
* @return void
*/
public function delete($type, $key)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment