Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
getExpire () | |
getName () | |
setName (string $name) | |
getId () | |
setId (string $id) | |
isActive () | |
isNew () | |
isStarted () | |
getToken ($forceNew=false) | |
hasToken ($token, $forceExpire=true) | |
get ($name, $default=null) | |
set ($name, $value=null) | |
has ($name) | |
remove (string $name) | |
clear () | |
all () | |
start () | |
destroy () | |
restart () | |
fork () | |
close () | |
gc () | |
abort () | |
Interface defining a Joomla! Session object
abort | ( | ) |
Aborts the current session
Implémenté dans Session.
all | ( | ) |
clear | ( | ) |
close | ( | ) |
Writes session data and ends session
Session data is usually stored after your script terminated without the need to call SessionInterface::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.
Implémenté dans Session.
destroy | ( | ) |
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.
Implémenté dans Session.
fork | ( | ) |
Create a new session and copy variables from the old one
Référencé par Session\destroy().
gc | ( | ) |
Perform session data garbage collection
Implémenté dans Session.
get | ( | $name, | |
$default = null |
|||
) |
Get data from the session store
string | $name | Name of a variable |
mixed | $default | Default value of a variable if not set |
Implémenté dans Session, et Session.
Référencé par MetadataManager\createSessionRecord().
getExpire | ( | ) |
Get expiration time in seconds
Implémenté dans Session.
getId | ( | ) |
Get the session ID
Implémenté dans Session.
Référencé par MetadataManager\createOrUpdateRecord(), MetadataManager\createRecordIfNonExisting(), MetadataManager\createSessionRecord(), et MetadataManager\updateSessionRecord().
getName | ( | ) |
getToken | ( | $forceNew = false | ) |
Get a session token.
Tokens are used to secure forms from spamming attacks. Once a token has been generated the system will check the request to see if it is present, if not it will invalidate the session.
boolean | $forceNew | If true, forces a new token to be created |
Implémenté dans Session.
has | ( | $name | ) |
hasToken | ( | $token, | |
$forceExpire = true |
|||
) |
Check if the session has the given token.
string | $token | Hashed token to be verified |
boolean | $forceExpire | If true, expires the session |
Implémenté dans Session.
isActive | ( | ) |
isNew | ( | ) |
Check whether this session is newly created
Implémenté dans Session.
Référencé par MetadataManager\createSessionRecord().
isStarted | ( | ) |
remove | ( | string | $name | ) |
Unset a variable from the session store
string | $name | Name of variable |
Implémenté dans Session.
restart | ( | ) |
set | ( | $name, | |
$value = null |
|||
) |
setId | ( | string | $id | ) |
Set the session ID
string | $id | The session ID |
Implémenté dans Session.
setName | ( | string | $name | ) |
Set the session name
string | $name | The session name |
Implémenté dans Session.
start | ( | ) |