Library
Class

Library\Session\Session

class Session implements SessionInterface

Session manager class

Constants

SESSION_NAME

The session attributes application stack

SESSION_ATTRIBUTESNAME

The session attributes stack

Methods

__construct()

Constructor

__destruct()

Automatically store new entries at object destruction

Session addSessionTable(string $index, mixed $value)

Add a session table entry

array getSessionTable()

Get the full session table

string getId()

Get current session ID

string getName()

Get current session name

bool isOpened()

Test if the current session is already started

bool isLoaded()

Test if the current session is already loaded

Session start()

Start the current session and read it

Session open()

Open the current session

Session close()

Close the current session

Session read()

Read the current session contents

Session commit()

Save current session

Session clear()

Destroy current session

Session regenerateId()

Regenrate current session ID

array getAttributes()

Get all current session values

bool has(string $param)

Test if the current session has a parameter

mixed get(string $param)

Get current session parameter

Session set(string $param, mixed $value)

Set current session parameter

Session remove(string $param)

Delete a session parameter

Session getBackup(string $param)

Get an initial session value

Details

at line 75
public __construct()

Constructor

at line 87
public __destruct()

Automatically store new entries at object destruction

at line 105
public Session addSessionTable(string $index, mixed $value)

Add a session table entry

Parameters

string $index
mixed $value

Return Value

Session

at line 116
public array getSessionTable()

Get the full session table

Return Value

array

at line 126
public string getId()

Get current session ID

Return Value

string

at line 139
public string getName()

Get current session name

Return Value

string

at line 149
public bool isOpened()

Test if the current session is already started

Return Value

bool

at line 159
public bool isLoaded()

Test if the current session is already loaded

Return Value

bool

at line 173
public Session start()

Start the current session and read it

Return Value

Session

at line 189
public Session open()

Open the current session

Return Value

Session

at line 207
public Session close()

Close the current session

Return Value

Session

at line 225
public Session read()

Read the current session contents

Return Value

Session

at line 243
public Session commit()

Save current session

Return Value

Session

at line 258
public Session clear()

Destroy current session

Return Value

Session

at line 273
public Session regenerateId()

Regenrate current session ID

Return Value

Session

at line 287
public array getAttributes()

Get all current session values

Return Value

array

at line 301
public bool has(string $param)

Test if the current session has a parameter

Parameters

string $param

Return Value

bool

at line 315
public mixed get(string $param)

Get current session parameter

Parameters

string $param

Return Value

mixed

at line 330
public Session set(string $param, mixed $value)

Set current session parameter

Parameters

string $param
mixed $value

Return Value

Session

at line 345
public Session remove(string $param)

Delete a session parameter

Parameters

string $param

Return Value

Session

at line 362
public Session getBackup(string $param)

Get an initial session value

Parameters

string $param

Return Value

Session