Documentation

Session
in package

Weaver Framework - Session Management Class

This class provides session management functionalities for starting, setting, getting, unsetting, and destroying sessions.

Table of Contents

Methods

destroy()  : mixed
Destroy the current session.
get()  : mixed
Get the value of a session variable.
has()  : mixed
Check is session exists.
set()  : mixed
Set a session variable.
unset()  : mixed
Unset a session variable.

Methods

destroy()

Destroy the current session.

public static destroy() : mixed

get()

Get the value of a session variable.

public static get(string $key[, mixed $default = null ]) : mixed
Parameters
$key : string

The session variable name.

$default : mixed = null

The default value to return if the session variable is not set.

Return values
mixed

The value of the session variable or the default value.

has()

Check is session exists.

public static has(mixed $key) : mixed
Parameters
$key : mixed

set()

Set a session variable.

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

The session variable name.

$value : mixed

The value to store in the session.

unset()

Unset a session variable.

public static unset(string $key) : mixed
Parameters
$key : string

The session variable name.


        
On this page

Search results