Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
a7cc3b0d
Commit
a7cc3b0d
authored
9 years ago
by
Tim van Dijen
Browse files
Options
Downloads
Patches
Plain Diff
PSR-2
reformatting of Memcache.php
parent
f7281978
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/SimpleSAML/Store/Memcache.php
+50
-48
50 additions, 48 deletions
lib/SimpleSAML/Store/Memcache.php
with
50 additions
and
48 deletions
lib/SimpleSAML/Store/Memcache.php
+
50
−
48
View file @
a7cc3b0d
...
...
@@ -5,62 +5,64 @@
*
* @package simpleSAMLphp
*/
class
SimpleSAML_Store_Memcache
extends
SimpleSAML_Store
{
class
SimpleSAML_Store_Memcache
extends
SimpleSAML_Store
{
/**
* Initialize the memcache datastore.
*/
protected
function
__construct
()
{
}
/**
* Initialize the memcache datastore.
*/
protected
function
__construct
()
{
}
/**
* Retrieve a value from the datastore.
*
* @param string $type The datatype.
* @param string $key The key.
* @return mixed|NULL The value.
*/
public
function
get
(
$type
,
$key
)
{
assert
(
'is_string($type)'
);
assert
(
'is_string($key)'
);
/**
* Retrieve a value from the datastore.
*
* @param string $type The datatype.
* @param string $key The key.
* @return mixed|NULL The value.
*/
public
function
get
(
$type
,
$key
)
{
assert
(
'is_string($type)'
);
assert
(
'is_string($key)'
);
return
SimpleSAML_Memcache
::
get
(
'simpleSAMLphp.'
.
$type
.
'.'
.
$key
);
}
return
SimpleSAML_Memcache
::
get
(
'simpleSAMLphp.'
.
$type
.
'.'
.
$key
);
}
/**
* Save a value to the datastore.
*
* @param string $type The datatype.
* @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.
*/
public
function
set
(
$type
,
$key
,
$value
,
$expire
=
null
)
{
assert
(
'is_string($type)'
);
assert
(
'is_string($key)'
);
assert
(
'is_null($expire) || (is_int($expire) && $expire > 2592000)'
);
/**
* Save a value to the datastore.
*
* @param string $type The datatype.
* @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.
*/
public
function
set
(
$type
,
$key
,
$value
,
$expire
=
NULL
)
{
assert
(
'is_string($type)'
);
assert
(
'is_string($key)'
);
assert
(
'is_null($expire) || (is_int($expire) && $expire > 2592000)'
);
if
(
$expire
===
null
)
{
$expire
=
0
;
}
if
(
$expire
===
NULL
)
{
$expire
=
0
;
}
SimpleSAML_Memcache
::
set
(
'simpleSAMLphp.'
.
$type
.
'.'
.
$key
,
$value
,
$expire
);
}
SimpleSAML_Memcache
::
set
(
'simpleSAMLphp.'
.
$type
.
'.'
.
$key
,
$value
,
$expire
);
}
/**
* Delete a value from the datastore.
*
* @param string $type The datatype.
* @param string $key The key.
*/
public
function
delete
(
$type
,
$key
)
{
assert
(
'is_string($type)'
);
assert
(
'is_string($key)'
);
/**
* Delete a value from the datastore.
*
* @param string $type The datatype.
* @param string $key The key.
*/
public
function
delete
(
$type
,
$key
)
{
assert
(
'is_string($type)'
);
assert
(
'is_string($key)'
);
SimpleSAML_Memcache
::
delete
(
'simpleSAMLphp.'
.
$type
.
'.'
.
$key
);
}
SimpleSAML_Memcache
::
delete
(
'simpleSAMLphp.'
.
$type
.
'.'
.
$key
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment