API Joomla 1.5.26
Documentation des API du CMS Joomla en version 1.5
|
JSession::__construct | ( | $ | store = 'none' , |
$ | options = array() |
||
) |
Constructor
protected
string | $storage | |
array | $options | optional parameters |
Références JSessionStorage::getInstance().
JSession::__destruct | ( | ) |
Session object destructor
private
JSession::_createId | ( | ) | [static] |
JSession::_createToken | ( | $ | length = 32 | ) |
Create a token-string
protected
int | $length | lenght of string |
Références $i.
JSession::_setCookieParams | ( | ) |
Set session cookie parameters
private
JSession::_setCounter | ( | ) |
Set counter of session usage
protected
JSession::_setOptions | ( | &$ | options | ) |
set additional session options
protected
array | $options | list of parameter |
JSession::_setTimers | ( | ) |
JSession::_start | ( | ) |
Start a session
Creates a session (or resumes the current one based on the state of the session)
private
JSession::_validate | ( | $ | restart = false | ) |
Do some checks for security reason
If one check failed, session data has to be cleaned.
protected
boolean | $restart | reactivate session |
JSession::clear | ( | $ | name, |
$ | namespace = 'default' |
||
) |
Unset data from the session store
public
string | $name | Name of variable |
string | $namespace | Namespace to use, default to 'default' |
Références $name.
JSession::close | ( | ) |
Writes session data and ends session
Session data is usually stored after your script terminated without the need to call JSession::close(),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.
public
JSession::destroy | ( | ) | [static] |
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.
public
JSession::fork | ( | ) |
Create a new session and copy variables from the old one
public
& JSession::get | ( | $ | name, |
$ | default = null , |
||
$ | namespace = 'default' |
||
) | [static] |
JSession::getExpire | ( | ) |
Get expiration time in minutes
public
JSession::getId | ( | ) |
Get session id
public
& JSession::getInstance | ( | $ | handler, |
$ | options | ||
) |
Returns a reference to the global Session object, only creating it if it doesn't already exist.
This method must be invoked as:
$session = &JSession::getInstance();
public
Référencé par JFactory::_createSession().
JSession::getName | ( | ) |
Get session name
public
JSession::getState | ( | ) |
Get current state of session
public
JSession::getStores | ( | ) |
Get the session handlers
public
Références $class, $name, JFolder::files(), et jimport().
Référencé par ConfigControllerApplication::showConfig().
JSession::getToken | ( | $ | forceNew = false | ) |
Get a session token, if a token isn't set yet one will be generated.
Tokens are used to secure forms from spamming attacks. Once a token has been generated the system will check the post request to see if it is present, if not it will invalidate the session.
boolean | $forceNew | If true, force a new token to be created public |
JSession::has | ( | $ | name, |
$ | namespace = 'default' |
||
) |
Check wheter data exists in the session store
public
string | $name | Name of variable |
string | $namespace | Namespace to use, default to 'default' |
JSession::hasToken | ( | $ | tCheck, |
$ | forceExpire = true |
||
) | [static] |
Method to determine if a token exists in the session. If not the session will be set to expired
string | Hashed token to be verified |
boolean | If true, expires the session |
JSession::isNew | ( | ) |
Check whether this session is currently created
public
JSession::restart | ( | ) |
JSession::set | ( | $ | name, |
$ | value, | ||
$ | namespace = 'default' |
||
) |
Set data into the session store
public
string | $name | Name of a variable |
mixed | $value | Value of a variable |
string | $namespace | Namespace to use, default to 'default' |
Références $name.
JSession::$_expire = 15 |
JSession::$_force_ssl = false |
JSession::$_security = array( 'fix_browser' ) |
JSession::$_state = 'active' |
JSession::$_store = null |