JSessionHandlerJoomla
Extends \JSessionHandlerNativeInterface for managing HTTP sessions
since |
3.5 |
---|---|
deprecated |
4.0 The CMS' Session classes will be replaced with the |
package |
Joomla.Platform |
Methods
__construct
Public constructor
__construct(array $options = array())
since |
3.5 |
---|
Arguments
- $options
array
An array of configuration options
clear
Clear all session data in memory.
clear() : void
since |
3.5 |
---|
doSessionStart
Performs the session start mechanism
doSessionStart() : void
since |
3.5.1 |
---|---|
throws |
|
getId
Returns the session ID
getId() : string
since |
3.5 |
---|
Response
string
The session ID
getName
Returns the session name
getName() : mixed
since |
3.5 |
---|
Response
mixed
The session name
isStarted
Checks if the session is started.
isStarted() : boolean
since |
3.5 |
---|
Response
boolean
True if started, false otherwise.
regenerate
Regenerates ID that represents this storage.
regenerate(boolean $destroy = false, integer $lifetime = null) : boolean
Note regenerate+destroy should not clear the session data in memory only delete the session data from persistent storage.
since |
3.5 |
---|
Arguments
- $destroy
boolean
Destroy session when regenerating?- $lifetime
integer
Sets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp.
Response
boolean
True if session regenerated, false if error
save
Force the session to be saved and closed.
save() : void
This method must invoke session_write_close() unless this interface is used for a storage object design for unit or functional testing where a real PHP session would interfere with testing, in which case it should actually persist the session data if required.
see | \session_write_close() |
---|---|
since |
3.5 |
setCookieParams
Set session cookie parameters
setCookieParams() : void
since |
3.5 |
---|
setId
Sets the session ID
setId(string $id) : void
since |
3.5 |
---|---|
throws |
|
Arguments
- $id
string
The session ID
setName
Sets the session name
setName(string $name) : void
since |
3.5 |
---|---|
throws |
|
Arguments
- $name
string
The name of the session
setOptions
Set additional session options
setOptions(array $options) : boolean
since |
3.5 |
---|
Arguments
- $options
array
List of parameter
Response
boolean
True on success
start
Starts the session
start() : boolean
since |
3.5 |
---|
Response
boolean
True if started
Properties
input
The input object
since |
3.5 |
---|
Type(s)
\JInput
force_ssl
Force cookies to be SSL only
since |
3.5 |
---|
Type(s)
boolean
started
Has the session been started
since |
3.5 |
---|
Type(s)
boolean
closed
Has the session been closed
since |
3.5 |
---|
Type(s)
boolean