JSession
Class for managing HTTP sessions
Provides access to session-state values as well as session-level settings and lifetime management methods. Based on the standart PHP session handling mechanism it provides for you more advanced features such as expire timeouts.
Located in /joomla/environment/session.php (line 33)
JObject (Subpackage Base) JSession (Subpackage Environment)
Constructor
- string $storage
- array $options: optional parameters
- $store
- JObject::__construct()
- Class constructor, overridden in descendant classes.
Unset data from the session store
- string $name: Name of variable
- string $namespace: Namespace to use, default to 'default'
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.
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.
Get data from the session store
- string $name: Name of a variable
- mixed $default: Default value of a variable if not set
- string $namespace: Namespace to use, default to 'default'
- JObject::get()
- Returns a property of the object or the default value if the property is not set.
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();
- $handler
- $options
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
Check wheter data exists in the session store
- string $name: Name of variable
- string $namespace: Namespace to use, default to 'default'
Method to determine if a token exists in the session. If not the session will be set to expired
- string $tCheck: Hashed token to be verified
- boolean $forceExpire: If true, expires the session
Set data into the session store
- string $name: Name of a variable
- mixed $value: Value of a variable
- string $namespace: Namespace to use, default to 'default'
- JObject::set()
- Modifies a property of the object, creating it if it does not already exist.
Create a token-string
- int $length: lenght of string
set additional session options
- array $options: list of parameter
- &$options
Do some checks for security reason
- timeout check (expire)
- ip-fixiation
- browser-fixiation
- boolean $restart: reactivate session
Inherited Methods
Inherited From JObject
JObject::JObject()
JObject::__construct()
JObject::get()
JObject::getPublicProperties()
JObject::set()
JObject::toString()
Documentation generated on Mon, 05 Mar 2007 21:21:39 +0000 by phpDocumentor 1.3.1