Liste de tous les membres
Fonctions membres publiques |
| __construct ($store= 'none', $options=array()) |
| __destruct () |
| getState () |
| getExpire () |
| getToken ($forceNew=false) |
| hasToken ($tCheck, $forceExpire=true) |
| getName () |
| getId () |
| isNew () |
| get ($name, $default=null, $namespace= 'default') |
| set ($name, $value=null, $namespace= 'default') |
| has ($name, $namespace= 'default') |
| clear ($name, $namespace= 'default') |
| destroy () |
| restart () |
| fork () |
| close () |
| __construct ($properties=null) |
| __toString () |
| def ($property, $default=null) |
| get ($property, $default=null) |
| getProperties ($public=true) |
| getError ($i=null, $toString=true) |
| getErrors () |
| set ($property, $value=null) |
| setProperties ($properties) |
| setError ($error) |
| toString () |
Attributs protégés statiques |
static | $instance |
Documentation des constructeurs et destructeur
JSession::__construct |
( |
|
$store = 'none' , |
|
|
|
$options = array() |
|
) |
| |
Session object destructor
- Depuis:
- 11.1
Documentation des fonctions membres
Create a session id
- Renvoie:
- string Session ID
- Depuis:
- 11.1
Références $id.
JSession::_createToken |
( |
|
$length = 32 | ) |
|
|
protected |
Create a token-string
- Paramètres:
-
integer | $length | Length of string |
- Renvoie:
- string Generated token
- Depuis:
- 11.1
Références $i, et $name.
JSession::_setCookieParams |
( |
| ) |
|
|
protected |
JSession::_setCounter |
( |
| ) |
|
|
protected |
Set counter of session usage
- Renvoie:
- boolean True on success
- Depuis:
- 11.1
Références $counter.
JSession::_setOptions |
( |
& |
$options | ) |
|
|
protected |
Set additional session options
- Paramètres:
-
array | &$options | List of parameter |
- Renvoie:
- boolean True on success
- Depuis:
- 11.1
Références $options.
Set the session timers
- Renvoie:
- boolean True on success
- Depuis:
- 11.1
Start a session.
Creates a session (or resumes the current one based on the state of the session)
- Renvoie:
- boolean true on success
- Depuis:
- 11.1
Références JRequest\getVar().
JSession::_validate |
( |
|
$restart = false | ) |
|
|
protected |
Do some checks for security reason
- timeout check (expire)
- ip-fixiation
- browser-fixiation
If one check failed, session data has to be cleaned.
- Paramètres:
-
boolean | $restart | Reactivate session |
- Renvoie:
- boolean True on success
- Voir également:
- http://shiflett.org/articles/the-truth-about-sessions
- Depuis:
- 11.1
Références elseif, et null.
static JSession::checkToken |
( |
|
$method = 'post' | ) |
|
|
static |
Checks for a form token in the request.
Use in conjunction with JHtml::_('form.token') or JSession::getFormToken.
- Paramètres:
-
string | $method | The request method in which to look for the token key. |
- Renvoie:
- boolean True if found and valid, false otherwise.
- Depuis:
- 12.1
Références $app, JRoute\_(), JText\_(), JFactory\getApplication(), JFactory\getSession(), et JRequest\getVar().
Référencé par RedirectControllerLinks\activate(), UsersControllerUsers\activate(), MenusControllerItem\batch(), UsersControllerUser\batch(), ContactControllerContact\batch(), FinderControllerIndexer\batch(), WeblinksControllerWeblink\batch(), NewsfeedsControllerNewsfeed\batch(), BannersControllerBanner\batch(), ModulesControllerModule\batch(), CategoriesControllerCategory\batch(), ContentControllerArticle\batch(), UsersControllerMail\cancel(), MenusControllerItem\cancel(), TemplatesControllerSource\cancel(), LanguagesControllerOverride\cancel(), JControllerForm\cancel(), UsersControllerUsers\changeBlock(), CheckinController\checkin(), JControllerAdmin\checkin(), UsersControllerReset\complete(), UsersControllerReset\confirm(), TemplatesControllerTemplate\copy(), MediaControllerFolder\create(), JInstallationControllerSetup\database(), ContentControllerFeatured\delete(), MediaControllerFolder\delete(), LanguagesControllerOverrides\delete(), UsersControllerLevel\delete(), BannersControllerTracks\delete(), MenusControllerMenus\delete(), CacheController\delete(), CategoriesControllerCategories\delete(), JControllerAdmin\delete(), MediaControllerFile\delete(), JInstallationControllerSetup\detectFtpRoot(), TemplatesControllerStyles\duplicate(), ModulesControllerModules\duplicate(), ContactControllerContacts\featured(), ContentControllerArticles\featured(), JInstallationControllerSetup\filesystem(), InstallerControllerLanguages\find(), InstallerControllerUpdate\find(), InstallerControllerInstall\install(), JInstallationControllerSetup\loadSampleData(), UsersControllerUser\login(), LoginController\login(), LoginController\logout(), UsersControllerUser\logout(), FinderControllerIndexer\optimize(), InstallerControllerManage\publish(), JControllerAdmin\publish(), FinderControllerIndex\purge(), InstallerControllerLanguages\purge(), InstallerControllerUpdate\purge(), CacheController\purge(), CategoriesControllerCategories\rebuild(), MenusControllerItems\rebuild(), MenusControllerMenus\rebuild(), InstallerControllerManage\refresh(), UsersControllerRegistration\register(), UsersControllerUser\register(), UsersControllerRemind\remind(), UsersControllerUser\remind(), InstallerControllerManage\remove(), JInstallationControllerSetup\removeFolder(), ConfigControllerApplication\removeroot(), JControllerAdmin\reorder(), UsersControllerReset\request(), UsersControllerUser\resend(), SearchControllerSearches\reset(), MessagesControllerConfig\save(), FinderControllerFilter\save(), ConfigControllerComponent\save(), ConfigControllerApplication\save(), MenusControllerMenu\save(), LanguagesControllerOverride\save(), UsersControllerProfile\save(), MenusControllerItem\save(), TemplatesControllerSource\save(), JControllerForm\save(), JInstallationControllerSetup\saveconfig(), MenusControllerItems\saveorder(), CategoriesControllerCategories\saveorder(), JControllerAdmin\saveorder(), UsersControllerMail\send(), MailtoController\send(), LanguagesControllerInstalled\setDefault(), TemplatesControllerStyles\setDefault(), MenusControllerItems\setDefault(), JInstallationControllerSetup\setlanguage(), FinderControllerIndexer\start(), BannersControllerBanners\sticky_publish(), ContactControllerContact\submit(), TemplatesControllerStyles\unsetDefault(), InstallerControllerUpdate\update(), MediaControllerFile\upload(), JInstallationControllerSetup\verifyFtpSettings(), et ContentControllerArticle\vote().
JSession::clear |
( |
|
$name, |
|
|
|
$namespace = 'default' |
|
) |
| |
Unset data from the session store
- Paramètres:
-
string | $name | Name of variable |
string | $namespace | Namespace to use, default to 'default' |
- Renvoie:
- mixed The value from session or NULL if not set
- Depuis:
- 11.1
Références $name, et null.
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.
- Renvoie:
- void
- Voir également:
- session_write_close()
- Depuis:
- 11.1
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.
- Renvoie:
- boolean True on success
- Voir également:
- session_destroy()
-
session_unset()
- Depuis:
- 11.1
Références $config, et JFactory\getConfig().
Create a new session and copy variables from the old one
- Renvoie:
- boolean $result true on success
- Depuis:
- 11.1
Références $id.
JSession::get |
( |
|
$name, |
|
|
|
$default = null , |
|
|
|
$namespace = 'default' |
|
) |
| |
Get data from the session store
- Paramètres:
-
string | $name | Name of a variable |
mixed | $default | Default value of a variable if not set |
string | $namespace | Namespace to use, default to 'default' |
- Renvoie:
- mixed Value of a variable
- Depuis:
- 11.1
Références $name, et null.
Get expiration time in minutes
- Renvoie:
- integer The session expiration time in minutes
- Depuis:
- 11.1
static JSession::getFormToken |
( |
|
$forceNew = false | ) |
|
|
static |
Method to determine a hash for anti-spoofing variable names
- Paramètres:
-
boolean | $forceNew | If true, force a new token to be created |
- Renvoie:
- string Hashed var name
- Depuis:
- 11.1
Références $user, JApplication\getHash(), JFactory\getSession(), et JFactory\getUser().
Référencé par JInstallationJsonResponse\__construct(), JRequest\checkToken(), JFormFieldModal_Article\getInput(), modLoggedHelper\getList(), JCache\getWorkarounds(), JAdministrator\render(), et JHtmlForm\token().
Get session id
- Renvoie:
- string The session name
- Depuis:
- 11.1
Références null.
static JSession::getInstance |
( |
|
$handler, |
|
|
|
$options |
|
) |
| |
|
static |
Get session name
- Renvoie:
- string The session name
- Depuis:
- 11.1
Références null.
Get current state of session
- Renvoie:
- string The session state
- Depuis:
- 11.1
static JSession::getStores |
( |
| ) |
|
|
static |
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.
- Paramètres:
-
boolean | $forceNew | If true, force a new token to be created |
- Renvoie:
- string The session token
- Depuis:
- 11.1
Références null.
JSession::has |
( |
|
$name, |
|
|
|
$namespace = 'default' |
|
) |
| |
Check whether data exists in the session store
- Paramètres:
-
string | $name | Name of variable |
string | $namespace | Namespace to use, default to 'default' |
- Renvoie:
- boolean True if the variable exists
- Depuis:
- 11.1
Références $name, et null.
JSession::hasToken |
( |
|
$tCheck, |
|
|
|
$forceExpire = true |
|
) |
| |
Method to determine if a token exists in the session. If not the session will be set to expired
- Paramètres:
-
string | $tCheck | Hashed token to be verified |
boolean | $forceExpire | If true, expires the session |
- Renvoie:
- boolean
- Depuis:
- 11.1
Check whether this session is currently created
- Renvoie:
- boolean True on success.
- Depuis:
- 11.1
Références $counter.
Restart an expired or locked session.
- Renvoie:
- boolean True on success
- Voir également:
- destroy
- Depuis:
- 11.1
Références $id.
JSession::set |
( |
|
$name, |
|
|
|
$value = null , |
|
|
|
$namespace = 'default' |
|
) |
| |
Set data into the session store.
- Paramètres:
-
string | $name | Name of a variable. |
mixed | $value | Value of a variable. |
string | $namespace | Namespace to use, default to 'default'. |
- Renvoie:
- mixed Old value of a variable.
- Depuis:
- 11.1
Références $name, et null.
Documentation des données membres
JSession::$_force_ssl = false |
|
protected |
JSession::$_security = array('fix_browser') |
|
protected |
JSession::$_state = 'active' |
|
protected |
La documentation de cette classe a été générée à partir du fichier suivant :