AuthSessionDataHandler.php in Open Social 8.5
Same filename and directory in other branches
- 8.9 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php
- 8 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php
- 8.2 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php
- 8.3 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php
- 8.4 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php
- 8.6 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php
- 8.7 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php
- 8.8 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php
Namespace
Drupal\social_auth_extraFile
modules/custom/social_auth_extra/src/AuthSessionDataHandler.phpView source
<?php
namespace Drupal\social_auth_extra;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
/**
* Class AuthSessionDataHandler.
*
* @package Drupal\social_auth_extra
*/
class AuthSessionDataHandler implements AuthDataHandlerInterface {
/**
* Used for storing the session.
*
* @var \Symfony\Component\HttpFoundation\Session\SessionInterface
*/
protected $session;
/**
* Used for storing the session prefix.
*
* @var string
*/
protected $sessionPrefix;
/**
* Constructor.
*
* @param \Symfony\Component\HttpFoundation\Session\SessionInterface $session
* Used for reading data from and writing data to session.
*/
public function __construct(SessionInterface $session) {
$this->session = $session;
}
/**
* {@inheritdoc}
*/
public function get($key) {
return $this->session
->get($this->sessionPrefix . $key);
}
/**
* {@inheritdoc}
*/
public function set($key, $value) {
$this->session
->set($this->sessionPrefix . $key, $value);
}
/**
* {@inheritdoc}
*/
public function setPrefix($prefix) {
$this->sessionPrefix = $prefix;
}
}
Classes
Name | Description |
---|---|
AuthSessionDataHandler | Class AuthSessionDataHandler. |