SimpleSAML_Store::get PHP Method

get() abstract public method

Retrieve a value from the data store.
abstract public get ( string $type, string $key ) : mixed | null
$type string The data type.
$key string The key.
return mixed | null The value.
    public abstract function get($type, $key);

Usage Example

 /**
  * Load a session from the data store.
  *
  * @param string|null $sessionId The ID of the session we should load, or null to use the default.
  *
  * @return SimpleSAML_Session|null The session object, or null if it doesn't exist.
  */
 public function loadSession($sessionId = null)
 {
     assert('is_string($sessionId) || is_null($sessionId)');
     if ($sessionId === null) {
         $sessionId = $this->getCookieSessionId();
     }
     $session = $this->store->get('session', $sessionId);
     if ($session !== null) {
         assert('$session instanceof SimpleSAML_Session');
         return $session;
     }
     return null;
 }
All Usage Examples Of SimpleSAML_Store::get