final class ArraySession implements SessionInterface (View source)

A session held in memory: what a test injects, and what a request without a session (the public API) uses as a request-scoped cache.

Methods

__construct(array $values = [])

No description

mixed
get(string $key, mixed $default = null)

No description

void
set(string $key, mixed $value)

No description

bool
has(string $key)

No description

void
remove(string $key)

No description

array
all()

No description

void
clear()

Drops every stored value, keeping the session itself open

void
start()

Opens the session when it is not open yet

void
writeClose()

Writes the session out and closes it for this request

void
regenerateId(bool $deleteOldSession = true)

No description

void
destroy()

No description

bool
isActive()

No description

string
id()

The session id, an empty string when no session is open

Details

__construct(array $values = [])

No description

Parameters

array $values

The values the session starts with

mixed get(string $key, mixed $default = null)

No description

Parameters

string $key
mixed $default

Return Value

mixed

void set(string $key, mixed $value)

No description

Parameters

string $key
mixed $value

Return Value

void

bool has(string $key)

No description

Parameters

string $key

Return Value

bool

void remove(string $key)

No description

Parameters

string $key

Return Value

void

array all()

No description

Return Value

array

Every stored value, keyed by session key

void clear()

Drops every stored value, keeping the session itself open

Return Value

void

void start()

Opens the session when it is not open yet

Return Value

void

void writeClose()

Writes the session out and closes it for this request

Return Value

void

void regenerateId(bool $deleteOldSession = true)

No description

Parameters

bool $deleteOldSession

Return Value

void

void destroy()

No description

Return Value

void

bool isActive()

No description

Return Value

bool

string id()

The session id, an empty string when no session is open

Return Value

string