Overview

Packages

  • ClipIt
    • clipit
      • api
    • urjc
      • backend
  • Elgg
    • Core
      • Access
      • Authentication
      • Cache
      • Caches
      • Core
      • DataMode
        • Site
      • DataModel
        • Annotations
        • Entities
        • Extender
        • File
        • Importable
        • Loggable
        • Notable
        • Object
        • User
      • DataStorage
      • Exception
      • Exceptions
        • Stub
      • FileStore
        • Disk
      • Groups
      • Helpers
      • HMAC
      • Memcache
      • Metadata
      • Navigation
      • ODD
      • Output
      • Plugins
        • Settings
      • Sessions
      • SocialModel
        • Friendable
        • Locatable
      • WebServicesAPI
      • Widgets
      • XML
      • XMLRPC
    • Exceptions
      • Stub
  • None
  • PHP

Classes

  • ElggSession
  • Overview
  • Package
  • Class
  • Tree

Class ElggSession

Magic session class. This class is intended to extend the $_SESSION magic variable by providing an API hook to plug in other values.

Primarily this is intended to provide a way of supplying "logged in user" details without touching the session (which can cause problems when accessed server side).

If a value is present in the session then that value is returned, otherwise a plugin hook 'session:get', '$var' is called, where $var is the variable being requested.

Setting values will store variables in the session in the normal way.

LIMITATIONS: You can not access multidimensional arrays

ElggSession implements ArrayAccess
Package: Elgg\Core\Sessions
Located at ElggSession.php
Methods summary
public boolean
# __isset( string $key )

Test if property is set either as an attribute or metadata.

Test if property is set either as an attribute or metadata.

Parameters

$key
string
$key The name of the attribute or metadata.

Returns

boolean
public
# offsetSet( string $key, mixed $value )

Set a value, go straight to session.

Set a value, go straight to session.

Parameters

$key
string
$key Name
$value
mixed
$value Value

Implementation of

ArrayAccess::offsetSet()
public mixed
# offsetGet( mixed $key )

Get a variable from either the session, or if its not in the session attempt to get it from an api call.

Get a variable from either the session, or if its not in the session attempt to get it from an api call.

Parameters

$key
mixed
$key Name

Returns

mixed

See

ArrayAccess::offsetGet()

Implementation of

ArrayAccess::offsetGet()
public
# offsetUnset( mixed $key )

Unset a value from the cache and the session.

Unset a value from the cache and the session.

Parameters

$key
mixed
$key Name

See

ArrayAccess::offsetUnset()

Implementation of

ArrayAccess::offsetUnset()
public boolean
# offsetExists( integer $offset )

Return whether the value is set in either the session or the cache.

Return whether the value is set in either the session or the cache.

Parameters

$offset
integer
$offset Offset

Returns

boolean

See

ArrayAccess::offsetExists()

Implementation of

ArrayAccess::offsetExists()
public mixed
# get( string $key )

Alias to ::offsetGet()

Alias to ::offsetGet()

Parameters

$key
string
$key Name

Returns

mixed
public
# set( string $key, mixed $value )

Alias to ::offsetSet()

Alias to ::offsetSet()

Parameters

$key
string
$key Name
$value
mixed
$value Value
public
# del( string $key )

Alias to offsetUnset()

Alias to offsetUnset()

Parameters

$key
string
$key Name
API documentation generated by ApiGen 2.8.0