SessionProviderArray
in package
implements
SessionProviderInterface
Provides a session handle that stores session data in an array, useful for testing only.
Tags
Table of Contents
Interfaces
- SessionProviderInterface
- An interface that describes the use of sessions.
Properties
- $sessionArray : array<string|int, mixed>
- The hash array containing the session items.
- $ID : string
- The current session ID.
- $logger : Logger
- Trace logger.
Methods
- __construct() : mixed
- Constructor.
- delete() : void
- Deletes the value provided at that key in the session.
- destroy() : void
- Destroys the current session.
- get() : mixed
- Get the key value from the session. Returns false if nothing is found.
- getID() : string
- Get the current session ID if available.
- init() : void
- Starts a new session, or resumes an existing session if there is already a session ID available.
- set() : void
- Stores the value provided at that key in the session.
Properties
$sessionArray
The hash array containing the session items.
public
static array<string|int, mixed>
$sessionArray
= array()
Tags
$ID
The current session ID.
private
string
$ID
Tags
$logger
Trace logger.
private
static Logger
$logger
= null
Tags
Methods
__construct()
Constructor.
public
__construct() : mixed
Tags
delete()
Deletes the value provided at that key in the session.
public
delete(mixed $key) : void
Parameters
- $key : mixed
destroy()
Destroys the current session.
public
destroy() : void
get()
Get the key value from the session. Returns false if nothing is found.
public
get(mixed $key) : mixed
Parameters
- $key : mixed
getID()
Get the current session ID if available.
public
getID() : string
Return values
stringinit()
Starts a new session, or resumes an existing session if there is already a session ID available.
public
init() : void
set()
Stores the value provided at that key in the session.
public
set(mixed $key, mixed $value) : void
Parameters
- $key : mixed
- $value : mixed