From 42958a55c8d337da43b5bc7abf4e4b2756d45fcf Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Thu, 14 Feb 2008 14:39:53 +0000 Subject: [PATCH] Added ModifiedInfo interface, and changed the Session class to implement this interface. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@302 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/ModifiedInfo.php | 18 ++++++++++++++++++ lib/SimpleSAML/Session.php | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 lib/SimpleSAML/ModifiedInfo.php diff --git a/lib/SimpleSAML/ModifiedInfo.php b/lib/SimpleSAML/ModifiedInfo.php new file mode 100644 index 000000000..9eedc834c --- /dev/null +++ b/lib/SimpleSAML/ModifiedInfo.php @@ -0,0 +1,18 @@ +<?php + +/** + * The ModifiedInfo interface allows an object to export information about + * whether it has been modified since it was deserialized or not. + */ +interface SimpleSAML_ModifiedInfo { + + /** + * This function is used to determine if this object has changed + * since it was deserialized. + * + * @return TRUE if it has changed, FALSE if not. + */ + public function isModified(); + +} +?> \ No newline at end of file diff --git a/lib/SimpleSAML/Session.php b/lib/SimpleSAML/Session.php index a94a5ea86..2fa078b35 100644 --- a/lib/SimpleSAML/Session.php +++ b/lib/SimpleSAML/Session.php @@ -6,6 +6,8 @@ require_once('SimpleSAML/Session.php'); require_once('SimpleSAML/SessionHandler.php'); require_once('SimpleSAML/Metadata/MetaDataStorageHandler.php'); require_once('SimpleSAML/Logger.php'); +require_once('SimpleSAML/ModifiedInfo.php'); + /** * The Session class holds information about a user session, and everything attached to it. * @@ -18,7 +20,7 @@ require_once('SimpleSAML/Logger.php'); * @package simpleSAMLphp * @version $Id$ */ -class SimpleSAML_Session { +class SimpleSAML_Session implements SimpleSAML_ModifiedInfo { const STATE_ONLINE = 1; const STATE_LOGOUTINPROGRESS = 2; -- GitLab