Avolutions\Http\Session
The Session class provides functionality for the session handling.
Methods
Method | Visibility | Description |
---|---|---|
delete() | public | Deletes a session value by its key. |
destroy() | public | Destroys the session and unset all values. |
get() | public | Returns a session value by its key. |
isStarted() | public | Checks if a session is already started. |
set() | public | Set a new session value. |
start() | public | Starts and initializes a new session. |
Method Details
delete()
Deletes a session value by its key.
public
delete(string $key) : mixed
Parameters
string
$key
The key of the session value.
Return values
mixed Deletes a session value by its key.destroy()
Destroys the session and unset all values.
public
destroy() : mixed
Return values
mixed Destroys the session and unset all values.get()
Returns a session value by its key.
public
get(string $key) : mixed
Parameters
string
$key
The key of the session value.
Return values
mixed Returns a session value by its key.isStarted()
Checks if a session is already started.
public
isStarted() : bool