From 677953067f2bb5502a70f0d004f1ac844b18a128 Mon Sep 17 00:00:00 2001 From: emkael Date: Mon, 16 Jan 2017 22:04:43 +0100 Subject: * Facebook support --- .../FacebookMemoryPersistentDataHandler.php | 53 +++++++++++++++ .../FacebookSessionPersistentDataHandler.php | 76 ++++++++++++++++++++++ .../PersistentData/PersistentDataInterface.php | 49 ++++++++++++++ 3 files changed, 178 insertions(+) create mode 100644 lib/facebook-graph-sdk/src/Facebook/PersistentData/FacebookMemoryPersistentDataHandler.php create mode 100644 lib/facebook-graph-sdk/src/Facebook/PersistentData/FacebookSessionPersistentDataHandler.php create mode 100644 lib/facebook-graph-sdk/src/Facebook/PersistentData/PersistentDataInterface.php (limited to 'lib/facebook-graph-sdk/src/Facebook/PersistentData') diff --git a/lib/facebook-graph-sdk/src/Facebook/PersistentData/FacebookMemoryPersistentDataHandler.php b/lib/facebook-graph-sdk/src/Facebook/PersistentData/FacebookMemoryPersistentDataHandler.php new file mode 100644 index 0000000..93a6686 --- /dev/null +++ b/lib/facebook-graph-sdk/src/Facebook/PersistentData/FacebookMemoryPersistentDataHandler.php @@ -0,0 +1,53 @@ +sessionData[$key]) ? $this->sessionData[$key] : null; + } + + /** + * @inheritdoc + */ + public function set($key, $value) + { + $this->sessionData[$key] = $value; + } +} diff --git a/lib/facebook-graph-sdk/src/Facebook/PersistentData/FacebookSessionPersistentDataHandler.php b/lib/facebook-graph-sdk/src/Facebook/PersistentData/FacebookSessionPersistentDataHandler.php new file mode 100644 index 0000000..698bfd0 --- /dev/null +++ b/lib/facebook-graph-sdk/src/Facebook/PersistentData/FacebookSessionPersistentDataHandler.php @@ -0,0 +1,76 @@ +sessionPrefix . $key])) { + return $_SESSION[$this->sessionPrefix . $key]; + } + + return null; + } + + /** + * @inheritdoc + */ + public function set($key, $value) + { + $_SESSION[$this->sessionPrefix . $key] = $value; + } +} diff --git a/lib/facebook-graph-sdk/src/Facebook/PersistentData/PersistentDataInterface.php b/lib/facebook-graph-sdk/src/Facebook/PersistentData/PersistentDataInterface.php new file mode 100644 index 0000000..bd7e072 --- /dev/null +++ b/lib/facebook-graph-sdk/src/Facebook/PersistentData/PersistentDataInterface.php @@ -0,0 +1,49 @@ +