class Session (View source)

Constants

BYTES_LENGTH

CREATE_TIMEOUT

LOCK_TIMEOUT

Methods

__construct($config)

Reads and stores session data and creates a cookie

commit()

Save session data

string
getId()

Get current ID from session

regenerate()

Regenerate data

mixed
__get(string $name)

Magic method for get session variables (this method also returns variables that have not yet been committed)

__set(string $name, mixed $value)

Magic method for set session variables (this method don't commit data)

bool
__isset(string $name)

Magic method for check if variable is setted (this method also returns variables that have not yet been committed)

__unset(string $name)

Magic method for unset variable with unset() function

__destruct()

No description

Details

__construct($config)

Reads and stores session data and creates a cookie

Parameters

$config

Exceptions

Exception
ErrorException

commit()

Save session data

Exceptions

Exception

string getId()

Get current ID from session

Return Value

string

regenerate()

Regenerate data

mixed __get(string $name)

Magic method for get session variables (this method also returns variables that have not yet been committed)

Parameters

string $name

Return Value

mixed

__set(string $name, mixed $value)

Magic method for set session variables (this method don't commit data)

Parameters

string $name
mixed $value

Exceptions

Exception

bool __isset(string $name)

Magic method for check if variable is setted (this method also returns variables that have not yet been committed)

Parameters

string $name

Return Value

bool

__unset(string $name)

Magic method for unset variable with unset() function

Parameters

string $name

__destruct()

No description