final class SessionRedisConfig (View source)

Carries the connection and key namespace settings for Redis-backed sessions

Methods

__construct(string $host, int $port, int $database, string|null $password, string $prefix, float $timeout)

Defines the Redis endpoint, optional credentials and session key namespace

string
host()

Returns the Redis server host.

string
int
port()

Returns the Redis server TCP port.

int
int

Returns the Redis logical database number.

int
string|null

Returns the optional Redis authentication secret.

string|null
string
prefix()

Returns the namespace prefix for Redis session keys.

string
float

Returns the Redis connection timeout in seconds.

float

Details

__construct

__construct(string $host, int $port, int $database, string|null $password, string $prefix, float $timeout)

Defines the Redis endpoint, optional credentials and session key namespace

Parameters

string $host
int $port
int $database
string|null $password
string $prefix
float $timeout

host

string host()

Returns the Redis server host.

Return Value

string

port

int port()

Returns the Redis server TCP port.

Return Value

int

database

int database()

Returns the Redis logical database number.

Return Value

int

password

string|null password()

Returns the optional Redis authentication secret.

Return Value

string|null

prefix

string prefix()

Returns the namespace prefix for Redis session keys.

Return Value

string

timeout

float timeout()

Returns the Redis connection timeout in seconds.

Return Value

float