class Session

Session wrapper

Methods

static void
start(int|null $lifetime = null)

Start session

static bool
isStarted()

Return true if session is started

static bool
isActive()

Return true if session is active

static bool
recrete(int|null $lifetime = null)

Urecreate session

static integer
getStartTime()

Get session start time

static integer
getEndTime()

Get session end time.

static void
setLifetime(integer $time)

Set session lifetime

static integer
getLifetime()

Return session lifetime

static string
getId()

Get session Id

static array
getParams()

Get session params

static void
set(string $name, mixed $value)

Set value

static mixed
get(string $name, mixed $default = null)

Return session value or default value if session variable missing

static mixed
getValue(string $path)

Return sesion var by path

static void
remove(string $name)

Remove session value

static void
destroy(bool $destoryCookie = true)

Destroy session

static void
restart(integer|null $lifetime = null)

Clear all session varibales and start new sesion

static integer
getStatus()

Get session status

static array
toArray()

Get session array

static bool
isUseCookies()

Return true if session is stored in cookies

Details

at line 32
static void start(int|null $lifetime = null)

Start session

Parameters

int|null $lifetime

Return Value

void

at line 58
static bool isStarted()

Return true if session is started

Return Value

bool

at line 68
static bool isActive()

Return true if session is active

Return Value

bool

at line 79
static bool recrete(int|null $lifetime = null)

Urecreate session

Parameters

int|null $lifetime

Return Value

bool

at line 97
static integer getStartTime()

Get session start time

Return Value

integer

at line 107
static integer getEndTime()

Get session end time.

Return Value

integer

at line 118
static void setLifetime(integer $time)

Set session lifetime

Parameters

integer $time

Return Value

void

at line 130
static integer getLifetime()

Return session lifetime

Return Value

integer

at line 142
static string getId()

Get session Id

Return Value

string

at line 152
static array getParams()

Get session params

Return Value

array

at line 171
static void set(string $name, mixed $value)

Set value

Parameters

string $name
mixed $value

Return Value

void

at line 183
static mixed get(string $name, mixed $default = null)

Return session value or default value if session variable missing

Parameters

string $name
mixed $default

Return Value

mixed

at line 194
static mixed getValue(string $path)

Return sesion var by path

Parameters

string $path

Return Value

mixed

at line 205
static void remove(string $name)

Remove session value

Parameters

string $name

Return Value

void

at line 216
static void destroy(bool $destoryCookie = true)

Destroy session

Parameters

bool $destoryCookie

Return Value

void

at line 230
static void restart(integer|null $lifetime = null)

Clear all session varibales and start new sesion

Parameters

integer|null $lifetime

Return Value

void

at line 242
static integer getStatus()

Get session status

Return Value

integer

at line 252
static array toArray()

Get session array

Return Value

array

at line 262
static bool isUseCookies()

Return true if session is stored in cookies

Return Value

bool