3 use Symfony\Component\HttpFoundation\Session\SessionInterface;
 
    4 use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
 
    5 use Symfony\Component\HttpFoundation\Session\Session;
 
   57         $result = $this->storage->start();
 
   69     public function migrate($destroy = 
false) {
 
   70         return $this->storage->migrate($destroy);
 
   82         $this->storage->clear();
 
   83         $this->logged_in_user = 
null;
 
   96         return $this->storage->isStarted();
 
  106         return $this->storage->getId();
 
  117         $this->storage->setId(
$id);
 
  127         return $this->storage->getName();
 
  138         $this->storage->setName(
$name);
 
  171         return $this->storage->remove(
$name);
 
  194         return $this->storage->has(
$name);
 
  205         $this->
set(
'guid', $user->guid);
 
  206         $this->logged_in_user = 
$user;
 
  257         $this->logged_in_user = 
null;
 
  258         $this->
remove(
'guid');
 
  281         $this->ignore_access = $ignore;
 
  327         if (!$this->
has(
'__elgg_session')) {
 
  328             $this->
set(
'__elgg_session', 
_elgg_services()->crypto->getRandomString(22));
 
  374         if (in_array(
$key, array(
'user', 
'id', 
'name', 
'username'))) {
 
  376             if ($this->logged_in_user) {
 
  382                         return $this->logged_in_user->guid;
 
  386                         return $this->logged_in_user->$key;
 
  395             return $this->
get(
$key);
 
  400         if ($orig_value !== 
$value) {
 
  436         if (in_array(
$offset, array(
'user', 
'id', 
'name', 
'username'))) {
 
  459         $storage = 
new MockArraySessionStorage();
 
if(! $collection_name) $id
 
if($guid==elgg_get_logged_in_user_guid()) $name
 
offsetUnset($key)
Unset a value from the cache and the session.
 
migrate($destroy=false)
Migrates the session to a new session id while maintaining session attributes.
 
offsetSet($key, $value)
Set a value, go straight to session.
 
has($name)
Has the attribute been defined.
 
static getMock()
Get an isolated ElggSession that does not persist between requests.
 
setLoggedInUser(\ElggUser $user)
Sets the logged in user.
 
invalidate()
Invalidates the session.
 
getLoggedInUser()
Gets the logged in user.
 
getIgnoreAccess()
Get current ignore access setting.
 
__construct(SessionInterface $storage)
Constructor.
 
isLoggedIn()
Returns whether or not the user is currently logged in.
 
__isset($key)
Test if property is set either as an attribute or metadata.
 
generateSessionToken()
Adds a token to the session.
 
offsetExists($offset)
Return whether the value is set in either the session or the cache.
 
getId()
Get the session ID.
 
del($key)
Alias to offsetUnset()
 
get_ignore_access()
Alias of getIgnoreAccess()
 
setId($id)
Set the session ID.
 
set_ignore_access($ignore=true)
Alias of setIgnoreAccess()
 
removeLoggedInUser()
Remove the logged in user.
 
setIgnoreAccess($ignore=true)
Set ignore access.
 
isStarted()
Has the session been started.
 
isAdminLoggedIn()
Returns whether or not the viewer is currently logged in and an admin user.
 
getLoggedInUserGuid()
Return the current logged in user by guid.
 
start()
Start the session.
 
getName()
Get the session name.
 
setName($name)
Set the session name.
 
offsetGet($key)
Get a variable from either the session, or if its not in the session attempt to get it from an api ca...
 
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.