NativeSession
- Full name:
\Qubus\Http\Session\NativeSession
- This class implements:
\Qubus\Http\Session\PhpSession
Constants
Constant | Visibility | Type | Value |
---|---|---|---|
SESSION_OPTIONS | protected | ['use_cookies' => 1, 'cookie_secure' => 1, 'cookie_lifetime' => 360, 'cookie_path' => '/', 'cookie_domain' => '', 'use_only_cookies' => 1, 'cookie_httponly' => 1, 'use_strict_mode' => 1, 'cache_limiter' => 'nocache', 'cache_expire' => 180, 'cookie_samesite' => 'Lax'] |
Properties
started
config
sessionId
Methods
__construct
public __construct(\Qubus\Config\ConfigContainer $config, ?\SessionHandlerInterface $handler = null, ?string $sessionId = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$config | \Qubus\Config\ConfigContainer | |
$handler | ?\SessionHandlerInterface | |
$sessionId | ?string |
has
Checks if session exists.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | Session name. |
Throws:
get
Retrieve session.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | Session name. |
Throws:
set
Sets the session.
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | Session name. |
$value | mixed | Value of the session set. |
Throws:
configOptions
Returns an array of session configOptions.
Throws:
isSessionActive
Returns true if sessions are enabled, and one exists.
sessionId
Returns the current session id if it exists. If not, it will be set.
Parameters:
Parameter | Type | Description |
---|---|---|
$id | string|null | Id of the session. |
regenerateId
Updates the current session ID with a new one.
Throws:
startSession
Starts a new session or resumes an existing session.
Throws:
currentSessionName
Returns the current session name.
destroySession
Destroys all session data.
unsetSession
Destroy specific session data by key.
Parameters:
Parameter | Type | Description |
---|---|---|
$key | string |
Throws:
getAll
Returns all session data.
Throws:
clear
Throws:
getCookieParameters
Returns the session cookie parameters.
Automatically generated on 2025-10-13