class AuthSessionDataHandler in Open Social 8
Same name and namespace in other branches
- 8.9 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php \Drupal\social_auth_extra\AuthSessionDataHandler
- 8.2 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php \Drupal\social_auth_extra\AuthSessionDataHandler
- 8.3 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php \Drupal\social_auth_extra\AuthSessionDataHandler
- 8.4 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php \Drupal\social_auth_extra\AuthSessionDataHandler
- 8.5 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php \Drupal\social_auth_extra\AuthSessionDataHandler
- 8.6 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php \Drupal\social_auth_extra\AuthSessionDataHandler
- 8.7 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php \Drupal\social_auth_extra\AuthSessionDataHandler
- 8.8 modules/custom/social_auth_extra/src/AuthSessionDataHandler.php \Drupal\social_auth_extra\AuthSessionDataHandler
Class AuthSessionDataHandler.
@package Drupal\social_auth_extra
Hierarchy
- class \Drupal\social_auth_extra\AuthSessionDataHandler implements AuthDataHandlerInterface
Expanded class hierarchy of AuthSessionDataHandler
1 file declares its use of AuthSessionDataHandler
- FacebookAuthPersistentDataHandler.php in modules/
custom/ social_auth_facebook/ src/ FacebookAuthPersistentDataHandler.php
1 string reference to 'AuthSessionDataHandler'
- social_auth_extra.services.yml in modules/
custom/ social_auth_extra/ social_auth_extra.services.yml - modules/custom/social_auth_extra/social_auth_extra.services.yml
1 service uses AuthSessionDataHandler
- social_auth_extra.session_persistent_data_handler in modules/
custom/ social_auth_extra/ social_auth_extra.services.yml - \Drupal\social_auth_extra\AuthSessionDataHandler
File
- modules/
custom/ social_auth_extra/ src/ AuthSessionDataHandler.php, line 12
Namespace
Drupal\social_auth_extraView source
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AuthSessionDataHandler:: |
protected | property | Used for storing the session. | |
AuthSessionDataHandler:: |
protected | property | Used for storing the session prefix. | |
AuthSessionDataHandler:: |
public | function |
Get a value from a persistent data store. Overrides AuthDataHandlerInterface:: |
|
AuthSessionDataHandler:: |
public | function |
Set a value in the persistent data store. Overrides AuthDataHandlerInterface:: |
|
AuthSessionDataHandler:: |
public | function |
Set a key which will be used as prefix for keys in the storage. Overrides AuthDataHandlerInterface:: |
|
AuthSessionDataHandler:: |
public | function | Constructor. |