\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 :boolean

Type

boolean—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): 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(string  $key): boolean

check id key is empty/set or not

Parameters

string $key

Returns

boolean