You are here

public function SocialApiDataHandler::set in Social API 8.2

Same name and namespace in other branches
  1. 3.x src/SocialApiDataHandler.php \Drupal\social_api\SocialApiDataHandler::set()

Sets a new session variable.

Parameters

string $key: The session variable key.

mixed $value: The session variable value.

File

src/SocialApiDataHandler.php, line 57

Class

SocialApiDataHandler
Variables are written to and read from session via this class.

Namespace

Drupal\social_api

Code

public function set($key, $value) {
  $this->session
    ->set($this
    ->getSessionPrefix() . $key, $value);
}