API Documentation (v0.9.0-alpha)

Avolutions\Http\Session

The Session class provides functionality for the session handling.

Methods

Method Visibility Description
delete() public Deletes a session value by its key.
destroy() public Destroys the session and unset all values.
get() public Returns a session value by its key.
isStarted() public Checks if a session is already started.
set() public Set a new session value.
start() public Starts and initializes a new session.

Method Details

delete()

Deletes a session value by its key.

public delete(string $key) : mixed
Parameters

string $key
The key of the session value.

Return values
mixed Deletes a session value by its key.
destroy()

Destroys the session and unset all values.

public destroy() : mixed
Return values
mixed Destroys the session and unset all values.
get()

Returns a session value by its key.

public get(string $key) : mixed
Parameters

string $key
The key of the session value.

Return values
mixed Returns a session value by its key.
isStarted()

Checks if a session is already started.

public isStarted() : bool
Return values
bool Checks if a session is already started.
set()

Set a new session value.

public set(string $key, mixed $value) : mixed
Parameters

string $key
The key of the session value.

mixed $value
The value to store.

Return values
mixed Set a new session value.
start()

Starts and initializes a new session.

public start() : mixed
Return values
mixed Starts and initializes a new session.