Public Method Details |
&DBSESSION |
public void &DBSESSION( object dbctrl &$db, [ integer $time_to_live ] )
|
|
Set up a session manager.
|
Parameter |
|
|
|
integer |
$time_to_live |
= >>36000<< |
|
Number of seconds a session must be unused
before it expires. |
|
Returns |
void |
|
define_tables |
public void define_tables( )
|
|
Define the SQL tables used for session storage.
|
Returns |
void |
|
force_key |
public void force_key( )
|
|
Create a new session if none already exists.
|
Returns |
void |
|
lock |
public void lock( )
|
|
Lock current session forever.
A locked session can't be used nor destroyed anymore.
|
Returns |
void |
|
destroy |
public void destroy( )
|
|
Destroy current session.
The session is removed from the database forever.
|
Returns |
void |
|
key |
public string key( )
|
|
Get current session key.
|
Returns |
string Session key of random alphanumeric and numeric chars. |
|
id |
public int id( )
|
|
Get internal numeric session id.
The numeric session id should not be used in public!
|
Returns |
int Numeric session id. |
|
set |
public void set( string $entry, mixed $data )
|
|
Store data in a session entry.
|
Parameter |
|
string |
$entry |
|
|
Name of the entry to set. |
|
|
mixed |
$data |
|
|
Data to store. |
|
Returns |
void |
|
clear |
public void clear( string $entry )
|
|
Unset a session entry.
|
Parameter |
|
string |
$entry |
|
|
Name of the entry to set. |
|
Returns |
void |
|
get |
public void get( string $entry )
|
|
Get a session entry.
|
Parameter |
|
string |
$entry |
|
|
Name of the entry to set. |
|
Returns |
void |
|
set_timeout |
public void set_timeout( integer $seconds )
|
|
Set timeout for this manager.
|
Parameter |
|
integer |
$seconds |
|
|
Number of seconds a session must be unused before
it expires. |
|
Returns |
void |
|
set_table |
public void set_table( string $table )
|
|
Set name of sql table where sesuibs are stored.
|
Parameter |
|
string |
$table |
|
|
Table name. |
|
Returns |
void |
|