clear [line 253]
Free all session variables
destroy [line 241]
Frees all session variables and destroys all data registered to a session
This method resets the $_SESSION variable and destroys all of the data associated with the current session in its storage (file or DB). It forces new session to be started after this method is called. It does not unset the session cookie.
detectID [line 267]
Tries to find any session id in $_GET, $_POST or $_COOKIE
get [line 524]
mixed &get(
string
$name, [mixed
$default = null])
|
|
Returns session variable
Parameters:
getLocal [line 561]
mixed &getLocal(
string
$name, [mixed
$default = null])
|
|
Returns local variable of a script
Two scripts can have local variables with the same names
Parameters:
id [line 308]
string id(
[string
$id = null])
|
|
Sets new ID of a session
Parameters:
init [line 637]
isExpired [line 381]
Check if session is expired
isIdle [line 402]
isNew [line 479]
Gets a value indicating whether the session was created with the current request
You MUST call this method only after you have started the session with the HTTP_Session2::start() method.
localName [line 620]
string localName(
[string
$name = null])
|
|
Sets new local name
Parameters:
name [line 292]
string name(
[string
$name = null])
|
|
Sets new name of a session
Parameters:
pause [line 222]
Writes session data and ends session
Session data is usually stored after your script terminated without the need to call HTTP_Session2::stop(), but as session data is locked to prevent concurrent writes only one script may operate on a session at any time. When using framesets together with sessions you will experience the frames loading one by one due to this locking. You can reduce the time needed to load all the frames by ending the session as soon as all changes to session variables are done.
regenerateId [line 655]
boolean regenerateId(
[boolean
$deleteOldSessionData = false])
|
|
Regenrates session id
If session_regenerate_id() is not available emulates its functionality
Parameters:
register [line 498]
void register(
string
$name)
|
|
Register variable with the current session
Parameters:
replicate [line 685]
boolean replicate(
string
$target, [string
$id = null])
|
|
This function copies session data of specified id to specified table
Parameters:
sessionValidThru [line 365]
integer sessionValidThru(
)
|
|
Returns the time up to the session is valid
set [line 540]
mixed set(
string
$name, mixed
$value)
|
|
Sets session variable
Parameters:
setContainer [line 155]
void setContainer(
string
$container, [array
$container_options = null])
|
|
Sets user-defined session storage functions
Sets the user-defined session storage functions which are used for storing and retrieving data associated with a session. This is most useful when a storage method other than those supplied by PHP sessions is preferred. i.e. Storing the session data in a local database.
Parameters:
setExpire [line 324]
void setExpire(
integer
$time, [bool
$add = false])
|
|
Sets the maximum expire time
Parameters:
setGcMaxLifetime [line 701]
boolean setGcMaxLifetime(
[boolean
$gcMaxLifetime = null])
|
|
If optional parameter is specified it determines the number of seconds after which session data will be seen as 'garbage' and cleaned up
It returns the previous value of this property
Parameters:
setGcProbability [line 722]
boolean setGcProbability(
[boolean
$gcProbability = null])
|
|
If optional parameter is specified it determines the probability that the gc (garbage collection) routine is started and session data is cleaned up
It returns the previous value of this property
Parameters:
setIdle [line 348]
void setIdle(
integer
$time, [bool
$add = false])
|
|
Sets the maximum idle time
Sets the time-out period allowed between requests before the session-state provider terminates the session.
Parameters:
setLocal [line 582]
mixed setLocal(
string
$name, mixed
$value)
|
|
Sets local variable of a script.
Two scripts can have local variables with the same names.
Parameters:
start [line 188]
void start(
[string
$name = 'SessionID'], [string
$id = null])
|
|
Initializes session data
Creates a session (or resumes the current one based on the session id being passed via a GET variable or a cookie). You can provide your own name and/or id for a session.
Parameters:
unregister [line 511]
void unregister(
string
$name)
|
|
Unregister a variable from the current session
Parameters:
updateIdle [line 422]
useCookies [line 447]
boolean useCookies(
[boolean
$useCookies = null])
|
|
If optional parameter is specified it indicates whether the module will use cookies to store the session id on the client side in a cookie.
By default this cookie will be deleted when the browser is closed!
It will throw an Exception if it's not able to set the session.use_cookie property.
It returns the previous value of this property.
Parameters:
useTransSID [line 604]
boolean useTransSID(
[boolean
$useTransSID = false])
|
|
set the usage of transparent SID
Parameters: