Arikaim CMS

Session
in package

Session wrapper

Table of Contents

Properties

$defaultLifetime  : int
Default session lifetime value

Methods

destroy()  : void
Destroy session
get()  : mixed
Return session value or default value if session variable missing
getEndTime()  : int
Get session end time.
getId()  : string
Get session Id
getLifetime()  : int
Return session lifetime
getParams()  : array<string|int, mixed>
Get session params
getStartTime()  : int
Get session start time
getStatus()  : int
Get session status
isActive()  : bool
Return true if session is active
isStarted()  : bool
Return true if session is started
isUseCookies()  : bool
Return true if session is stored in cookies
recrete()  : bool
Urecreate session
remove()  : void
Remove session value
restart()  : void
Clear all session varibales and start new sesion
set()  : void
Set value
setLifetime()  : void
Set session lifetime
start()  : void
Start session
toArray()  : array<string|int, mixed>
Get session array

Properties

$defaultLifetime

Default session lifetime value

private static int $defaultLifetime = 360000

Methods

destroy()

Destroy session

public static destroy([bool $destoryCookie = true ]) : void
Parameters
$destoryCookie : bool = true

get()

Return session value or default value if session variable missing

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

getEndTime()

Get session end time.

public static getEndTime() : int
Return values
int

getId()

Get session Id

public static getId() : string
Return values
string

getLifetime()

Return session lifetime

public static getLifetime() : int
Return values
int

getParams()

Get session params

public static getParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getStartTime()

Get session start time

public static getStartTime() : int
Return values
int

getStatus()

Get session status

public static getStatus() : int
Return values
int

isActive()

Return true if session is active

public static isActive() : bool
Return values
bool

isStarted()

Return true if session is started

public static isStarted() : bool
Return values
bool

isUseCookies()

Return true if session is stored in cookies

public static isUseCookies() : bool
Return values
bool

recrete()

Urecreate session

public static recrete([int|null $lifetime = null ]) : bool
Parameters
$lifetime : int|null = null
Return values
bool

remove()

Remove session value

public static remove(string $name) : void
Parameters
$name : string

restart()

Clear all session varibales and start new sesion

public static restart([int|null $lifetime = null ]) : void
Parameters
$lifetime : int|null = null

set()

Set value

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

setLifetime()

Set session lifetime

public static setLifetime(int $time) : void
Parameters
$time : int

start()

Start session

public static start([int|null $lifetime = null ]) : void
Parameters
$lifetime : int|null = null

toArray()

Get session array

public static toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results