JSessionHandlerJoomla

Extends \JSessionHandlerNative

Interface for managing HTTP sessions

deprecated
since

3.5

deprecated

4.0 The CMS' Session classes will be replaced with the joomla/session package

package

Joomla.Platform

Methods

__construct

Public constructor

__construct(array $options = array()) 
since

3.5

Arguments

$options

arrayAn array of configuration options

clear

Clear all session data in memory.

clear() : void
inherited
since

3.5

doSessionStart

Performs the session start mechanism

doSessionStart() : void
inherited
since

3.5.1

throws

\RuntimeExceptionIf something goes wrong starting the session.

getId

Returns the session ID

getId() : string
inherited
since

3.5

Response

stringThe session ID

getName

Returns the session name

getName() : mixed
inherited
since

3.5

Response

mixedThe session name

isStarted

Checks if the session is started.

isStarted() : boolean
inherited
since

3.5

Response

booleanTrue if started, false otherwise.

regenerate

Regenerates ID that represents this storage.

regenerate(boolean $destroy = false, integer $lifetime = null) : boolean
inherited

Note regenerate+destroy should not clear the session data in memory only delete the session data from persistent storage.

since

3.5

Arguments

$destroy

booleanDestroy session when regenerating?

$lifetime

integerSets 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

booleanTrue if session regenerated, false if error

save

Force the session to be saved and closed.

save() : void
inherited

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
inherited
since

3.5

throws

\LogicException

Arguments

$id

stringThe session ID

setName

Sets the session name

setName(string $name) : void
inherited
since

3.5

throws

\LogicException

Arguments

$name

stringThe name of the session

setOptions

Set additional session options

setOptions(array $options) : boolean
since

3.5

Arguments

$options

arrayList of parameter

Response

booleanTrue on success

start

Starts the session

start() : boolean
inherited
since

3.5

Response

booleanTrue 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

inherited
since

3.5

Type(s)

boolean

closed

Has the session been closed

inherited
since

3.5

Type(s)

boolean