You are here

public function IpGeoLocSession::getSessionValue in IP Geolocation Views & Maps 8

Get a value from the user's SESSION or all values, if no name is specified.

Parameters

string $name: The name of the variable to retrieve.

Return value

mixed The session value belonging to $name or all session values when name is omittted.

File

src/Services/IpGeoLocSession.php, line 75

Class

IpGeoLocSession
Class DrupaliseMe.

Namespace

Drupal\ip_geoloc\Services

Code

public function getSessionValue($name = NULL) {
  $variables = $this
    ->setSessionValue(NULL);
  return empty($name) ? $variables : (isset($variables[$name]) ? $variables[$name] : NULL);
}