diff options
author | Andreas Åkre Solberg <andreas.solberg@uninett.no> | 2010-03-23 05:17:56 +0000 |
---|---|---|
committer | Andreas Åkre Solberg <andreas.solberg@uninett.no> | 2010-03-23 05:17:56 +0000 |
commit | 604c42c3247dfa3a8fc8f154e8bf4b1c20d46ec8 (patch) | |
tree | 17942acaed8b4fa51d4fd523c0e8aa648aca540f /modules/core/lib | |
parent | b40f6156fd2ba21d372d4f11ebbbd1c8874f80b1 (diff) | |
download | simplesamlphp-604c42c3247dfa3a8fc8f154e8bf4b1c20d46ec8.zip simplesamlphp-604c42c3247dfa3a8fc8f154e8bf4b1c20d46ec8.tar.gz simplesamlphp-604c42c3247dfa3a8fc8f154e8bf4b1c20d46ec8.tar.bz2 |
add new function to return value directly (without wrapper container)
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2231 44740490-163a-0410-bde0-09ae8108e29a
Diffstat (limited to 'modules/core/lib')
-rw-r--r-- | modules/core/lib/Storage/SQLPermanentStorage.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/core/lib/Storage/SQLPermanentStorage.php b/modules/core/lib/Storage/SQLPermanentStorage.php index 4f4180b..c2dfa05 100644 --- a/modules/core/lib/Storage/SQLPermanentStorage.php +++ b/modules/core/lib/Storage/SQLPermanentStorage.php @@ -120,6 +120,15 @@ class sspmod_core_Storage_SQLPermanentStorage { return $res; } + /* + * Return the value directly (not in a container) + */ + public function getValue($type = NULL, $key1 = NULL, $key2 = NULL) { + $res = $this->get($type, $key1, $key2); + if ($res === NULL) return NULL; + return $res['value']; + } + public function exists($type, $key1, $key2) { $query = "SELECT * FROM data WHERE " . "key1 = '" . sqlite_escape_string($key1) . "' AND " . |