\Alo\SessionMemcachedSession

The SQL-based session handler. ALO_SESSION_CLEANUP is not used here as cleanup is handled by the MySQL event handler

Summary

Methods
Properties
Constants
__construct()
__get()
__set()
__toString()
delete()
getAll()
getID()
expire()
terminate()
__destruct()
No public properties found
HASH_ALGO
EXPIRE_KEY
write()
setID()
fetch()
removeExpired()
identityCheck()
$data
$save
$time
$id
$mc
N/A
No private methods found
No private properties found
N/A

Constants

HASH_ALGO

HASH_ALGO

Hash algorithm in use

EXPIRE_KEY

EXPIRE_KEY

Session key under which key expiration data is stored

Properties

$data

$data : array

The data array

Type

array

$save

$save : boolean

Whether to save session data

Type

boolean

$time

$time : integer

Value of time()

Type

integer

$id

$id : string

The session ID

Type

string

Methods

__construct()

__construct() 

Instantiates the class

Throws

\Alo\Exception\ExtensionException

When a caching class is not available

__get()

__get(string  $key) : mixed

Gets a session value

Parameters

string $key

The identifier

Returns

mixed

__set()

__set(string  $key, mixed  $val) 

Sets a session value

Parameters

string $key

The identifier

mixed $val

The value

__toString()

__toString() : string

Returns a string representation of the session data

Returns

string

delete()

delete(string|array  $key) : \Alo\Session\AbstractSession

Deletes a session value

Parameters

string|array $key

The corresponding key or array of keys

Returns

\Alo\Session\AbstractSession

getAll()

getAll() : array

Returns all session data in an associative array

Returns

array

getID()

getID() : string

Returns the session ID

Returns

string

expire()

expire(string  $key, integer  $time) : \Alo\Session\AbstractSession

Sets a session key to expire

Parameters

string $key

The key

integer $time

Expiration time in seconds

Returns

\Alo\Session\AbstractSession

__destruct()

__destruct() 

Saves session data if $this->save hasn't been changed to false

setID()

setID() : \Alo\Session\SQLSession

Sets the session ID variable & the cookie

Returns

\Alo\Session\SQLSession

removeExpired()

removeExpired() : \Alo\Session\SQLSession

Removes expired session keys

Returns

\Alo\Session\SQLSession

identityCheck()

identityCheck() : boolean

Checks if the session hasn't been hijacked

Returns

boolean —

TRUE if the check has passed, FALSE if not and the session has been terminated.