\PhileSession

the Session class for implementing a session

Summary

Methods
Properties
Constants
start()
destroy()
save()
set()
get()
getSessionId()
isEmpty()
$isStarted
$sessionId
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$isStarted

$isStarted : bool

Type

bool — mark if session is started

$sessionId

$sessionId : string

Type

string — the session id

Methods

start()

start()

method to start the session

destroy()

destroy()

method to destroy the session

save()

save()

method to save and close the session

set()

set(string $key, mixed $value)

method to set value into session

Parameters

string $key
mixed $value

get()

get(string $key, mixed $default) : null|mixed

method to get value from session

Parameters

string $key
mixed $default

Returns

null|mixed

getSessionId()

getSessionId() : string

get the session id

Returns

string

isEmpty()

isEmpty(mixed $key) : bool

check id key is empty/set or not

Parameters

mixed $key

Returns

bool