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
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
GitLab 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
941ac88a
Commit
941ac88a
authored
Feb 19, 2022
by
Tim van Dijen
Browse files
Options
Downloads
Patches
Plain Diff
Add magic methods for Session
parent
2cea1562
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/SimpleSAML/Session.php
+9
-14
9 additions, 14 deletions
lib/SimpleSAML/Session.php
with
9 additions
and
14 deletions
lib/SimpleSAML/Session.php
+
9
−
14
View file @
941ac88a
...
...
@@ -28,7 +28,7 @@ use SimpleSAML\Utils;
* @package SimpleSAMLphp
*/
class
Session
implements
Serializable
,
Utils\ClearableState
class
Session
implements
Utils\ClearableState
{
/**
* This is a timeout value for setData, which indicates that the data
...
...
@@ -200,15 +200,15 @@ class Session implements Serializable, Utils\ClearableState
/**
* Serialize this
session object
.
* Serialize this
XML chunk
.
*
* This method will be invoked by any calls to serialize().
*
* @return
string
The serialized representation of this
session
object.
* @return
array
The serialized representation of this
XML
object.
*/
public
function
serialize
():
string
public
function
__
serialize
():
array
{
return
serialize
(
get_object_vars
(
$this
)
)
;
return
get_object_vars
(
$this
);
}
...
...
@@ -218,18 +218,13 @@ class Session implements Serializable, Utils\ClearableState
* This method will be invoked by any calls to unserialize(), allowing us to restore any data that might not
* be serializable in its original form (e.g.: DOM objects).
*
* @param string $serialized The serialized representation of a session that we want to restore.
*
* Cannot typehint param as string due to upstream restrictions
* @param array $serialized The serialized representation of a session that we want to restore.
*/
public
function
unserialize
(
$serialized
):
void
public
function
__
unserialize
(
$serialized
):
void
{
$session
=
unserialize
(
$serialized
);
if
(
is_array
(
$session
))
{
foreach
(
$session
as
$k
=>
$v
)
{
foreach
(
$serialized
as
$k
=>
$v
)
{
$this
->
$k
=
$v
;
}
}
self
::
$config
=
Configuration
::
getInstance
();
// look for any raw attributes and load them in the 'Attributes' array
...
...
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