Detailed Description
Session is the interface for session implementations and defines access to session variables.
Definition at line 19 of file Session.php.
Inheritance diagram for Session:Public Member Functions | |
| isStarted () | |
| getID () | |
| get ($key, $default=null) | |
| set ($key, $value) | |
| remove ($key) | |
| exist ($key) | |
| clear () | |
| destroy () | |
| setAuthUser ($login) | |
| getAuthUser () | |
Member Function Documentation
◆ isStarted()
| isStarted | ( | ) |
Check if the session is started.
- Returns
- Boolean.
Implemented in ClientSideSession, and DefaultSession.
◆ getID()
| getID | ( | ) |
Get the id of the session.
- Returns
- The id of the current session.
Implemented in ClientSideSession, and DefaultSession.
◆ get()
| get | ( | $key, | |
$default = null |
|||
| ) |
Returns the value of a session variable.
- Parameters
-
$key The key (name) of the session vaiable. $default The default value if the key is not defined (optional, default: null)
- Returns
- The session var or null if it doesn't exist.
Implemented in ClientSideSession, and DefaultSession.
◆ set()
| set | ( | $key, | |
| $value | |||
| ) |
Sets the value of a session variable.
- Parameters
-
$key The key (name) of the session vaiable. $value The value of the session variable.
Implemented in ClientSideSession, and DefaultSession.
◆ remove()
| remove | ( | $key | ) |
Remove a session variable.
- Parameters
-
$key The key (name) of the session variable.
Implemented in ClientSideSession, and DefaultSession.
◆ exist()
| exist | ( | $key | ) |
Tests, if a certain session variable is defined.
- Parameters
-
$key The key (name) of the session variable.
- Returns
- Boolean whether the session variable is set or not.
Implemented in ClientSideSession, and DefaultSession.
◆ clear()
| clear | ( | ) |
Clear the session data.
Implemented in ClientSideSession, and DefaultSession.
◆ destroy()
| destroy | ( | ) |
Destroy the session.
Implemented in ClientSideSession, and DefaultSession.
◆ setAuthUser()
| setAuthUser | ( | $login | ) |
Set the login of authenticated user.
- Parameters
-
$login Login name of the user
Implemented in ClientSideSession, DefaultSession, and AuthTokenSession.
◆ getAuthUser()
| getAuthUser | ( | ) |
Get the login of the authenticated user.
- Returns
- String
Implemented in ClientSideSession, DefaultSession, and AuthTokenSession.