final class UserSessionIdentity

Constants

private UNOWNED_CONTEXT_KEY

Methods

static void
suppress(string $sessionId)

Mark the given session identifier as unowned on subsequent writes.

static string
normalize(int|string $userId)

Normalize a user identifier for persistent storage.

resolve(Container|null $container, string $sessionId)

Resolve the identity state for the given session identifier.

bool
isResolved()

Determine if a user identity was resolved.

bool
isUnowned()

Determine if the identity is known to be unowned.

Details

at line 29
static void suppress(string $sessionId)

Mark the given session identifier as unowned on subsequent writes.

Parameters

string $sessionId

Return Value

void

at line 41
static string normalize(int|string $userId)

Normalize a user identifier for persistent storage.

Parameters

int|string $userId

Return Value

string

at line 58
static UserSessionIdentity resolve(Container|null $container, string $sessionId)

Resolve the identity state for the given session identifier.

Unresolved ownership is unknown and preserves a live association; unowned is known-none and clears one.

Parameters

Container|null $container
string $sessionId

Return Value

UserSessionIdentity

at line 96
bool isResolved()

Determine if a user identity was resolved.

Return Value

bool

at line 104
bool isUnowned()

Determine if the identity is known to be unowned.

Return Value

bool