DatabaseHandler
Implements HandlerInterfaceDatabase session storage handler
since |
2.0.0 |
---|---|
package |
Joomla Framework |
Methods
__construct
Constructor
__construct(\Joomla\Database\DatabaseInterface db) : mixed
since |
2.0.0 |
---|
Arguments
- db
\Joomla\Database\DatabaseInterface
Database connector
Response
mixed
close
Close the session
close() : bool
since |
2.0.0 |
---|
Response
bool
True on success, false otherwise
createDatabaseTable
Creates the session database table
createDatabaseTable() : bool
since |
2.0.0 |
---|---|
throws |
|
Response
bool
destroy
Destroy a session
destroy(int session_id) : bool
since |
2.0.0 |
---|
Arguments
- session_id
int
The session ID being destroyed
Response
bool
True on success, false otherwise
gc
Cleanup old sessions
gc(int maxlifetime) : bool
since |
2.0.0 |
---|
Arguments
- maxlifetime
int
Sessions that have not updated for the last maxlifetime seconds will be removed
Response
bool
True on success, false otherwise
isSupported
Test to see if the HandlerInterface is available
isSupported() : bool
since |
2.0.0 |
---|
Response
bool
True on success, false otherwise
open
Initialize session
open(string save_path, string session_id) : bool
since |
2.0.0 |
---|
Arguments
- save_path
string
The path where to store/retrieve the session- session_id
string
The session id
Response
bool
True on success, false otherwise
read
Read session data
read(string session_id) : string
since |
2.0.0 |
---|
Arguments
- session_id
string
The session id to read data for
Response
string
The session data
write
Write session data
write(string session_id, string session_data) : bool
since |
2.0.0 |
---|
Arguments
- session_id
string
The session id- session_data
string
The encoded session data
Response
bool
True on success, false otherwise
Properties
db
Database connector
since |
2.0.0 |
---|
Type(s)
\Joomla\Database\DatabaseInterface
gcCalled
Flag whether gc() has been called
since |
2.0.0 |
---|
Type(s)
bool
gcLifetime
Lifetime for garbage collection
since |
2.0.0 |
---|
Type(s)
int