SessionConfigDefinition
final class SessionConfigDefinition extends AbstractConfigDefinition (View source)
Builds declarative session configuration entries for application config sources
Properties
| protected mixed[] | $data | from AbstractConfigDefinition |
Methods
Replaces one configuration value at a dot-separated path.
Appends one configuration value at a dot-separated list path.
Starts an empty session configuration contribution
Creates the framework's canonical default session configuration contribution.
Resolves the framework's canonical default contribution into runtime configuration.
Returns the stable config module key consumed by the session provider
Selects the storage driver used for session persistence
Sets the browser cookie name that carries the session identifier
Sets the browser cross-site delivery policy for the session cookie.
Selects whether Secure follows the verified request scheme or is always enabled.
Sets the shared cookie and storage retention period in seconds
Sets the writable storage path used by native PHP sessions
Sets the writable storage path used by file-backed sessions
Sets the database table used by database-backed sessions
Sets the Redis host used by Redis-backed sessions
Sets the Redis TCP port used by Redis-backed sessions
Sets the Redis logical database used by Redis-backed sessions
Sets the optional Redis authentication secret
Sets the namespace prefix applied to Redis session keys
Sets the connection timeout for Redis-backed sessions in seconds
Applies this raw configuration contribution to an already resolved session configuration.
Details
toArray
array
toArray()
No description
set
protected AbstractConfigDefinition
set(string $path, mixed $value)
Replaces one configuration value at a dot-separated path.
append
protected AbstractConfigDefinition
append(string $path, mixed $value)
Appends one configuration value at a dot-separated list path.
defaults
static SessionConfigDefinition
defaults()
Creates the framework's canonical default session configuration contribution.
resolvedDefaults
static SessionConfig
resolvedDefaults()
Resolves the framework's canonical default contribution into runtime configuration.
moduleKey
static string
moduleKey()
Returns the stable config module key consumed by the session provider
driver
SessionConfigDefinition
driver(string $driver)
Selects the storage driver used for session persistence
cookieName
SessionConfigDefinition
cookieName(string $cookie)
Sets the browser cookie name that carries the session identifier
cookieSameSite
SessionConfigDefinition
cookieSameSite(SessionCookieSameSite $sameSite)
Sets the browser cross-site delivery policy for the session cookie.
cookieSecure
SessionConfigDefinition
cookieSecure(SessionCookieSecure $secure)
Selects whether Secure follows the verified request scheme or is always enabled.
lifetime
SessionConfigDefinition
lifetime(int $seconds)
Sets the shared cookie and storage retention period in seconds
nativePath
SessionConfigDefinition
nativePath(string $path)
Sets the writable storage path used by native PHP sessions
filePath
SessionConfigDefinition
filePath(string $path)
Sets the writable storage path used by file-backed sessions
databaseTable
SessionConfigDefinition
databaseTable(string $table)
Sets the database table used by database-backed sessions
redisHost
SessionConfigDefinition
redisHost(string $host)
Sets the Redis host used by Redis-backed sessions
redisPort
SessionConfigDefinition
redisPort(int $port)
Sets the Redis TCP port used by Redis-backed sessions
redisDatabase
SessionConfigDefinition
redisDatabase(int $database)
Sets the Redis logical database used by Redis-backed sessions
redisPassword
SessionConfigDefinition
redisPassword(string|null $password)
Sets the optional Redis authentication secret
redisPrefix
SessionConfigDefinition
redisPrefix(string $prefix)
Sets the namespace prefix applied to Redis session keys
redisTimeout
SessionConfigDefinition
redisTimeout(float|int $seconds)
Sets the connection timeout for Redis-backed sessions in seconds
applyTo
SessionConfig
applyTo(SessionConfig $current)
Applies this raw configuration contribution to an already resolved session configuration.
Missing fields preserve their current values, while an explicitly configured Redis password may clear it.