ISession
Interface ISession
wrap PHP's internal session handling into the ISession interface
Tags
Table of Contents
- clear() : mixed
- Reset and recreate the session
- close() : mixed
- Close the session and release the lock
- exists() : bool
- Check if a named key exists in the session
- get() : mixed
- Get a value from the session
- getId() : string
- Wrapper around session_id
- regenerateId() : void
- Wrapper around session_regenerate_id
- remove() : mixed
- Remove a $key/$value pair from the session
- set() : mixed
- Set a value in the session
Methods
clear()
Reset and recreate the session
public
clear() : mixed
Tags
Return values
mixed —close()
Close the session and release the lock
public
close() : mixed
Tags
Return values
mixed —exists()
Check if a named key exists in the session
public
exists(string $key) : bool
Parameters
- $key : string
Tags
Return values
bool —get()
Get a value from the session
public
get(string $key) : mixed
Parameters
- $key : string
Tags
Return values
mixed —should return null if $key does not exist
getId()
Wrapper around session_id
public
getId() : string
Tags
Return values
string —regenerateId()
Wrapper around session_regenerate_id
public
regenerateId([bool $deleteOldSession = true ][, bool $updateToken = false ]) : void
Parameters
- $deleteOldSession : bool = true
-
Whether to delete the old associated session file or not.
- $updateToken : bool = false
-
Wheater to update the associated auth token
Tags
remove()
Remove a $key/$value pair from the session
public
remove(string $key) : mixed
Parameters
- $key : string
Tags
Return values
mixed —set()
Set a value in the session
public
set(string $key, mixed $value) : mixed
Parameters
- $key : string
- $value : mixed