namespace \webfiori\framework\session
class Session
Class Attributes Summary
Class Methods Summary
Class Attributes Details
Class Methods Details
Parameters:
- array $options An array that contains session options. Available options are:
- name: The name of the session. A valid name can only consist of [a-z], [A-Z], [0-9], dash and underscore. This must be provided or the method will throw an exception.
- duration: The duration of the session in minutes. Must be a number greater than or equal to 0. If 0 is given, it means the session is not persistent. If the duration is invalid, it will be set to Session::DEFAULT_SESSION_DURATION
- refresh: A boolean which is set to true if session timeout time will be refreshed with every request. Default is false.
Parameters:
- string $varName The name of the variable.
- expires: The time at which session cookie will expire. If the cookie is persistent, this will have a non-zero value.
- domain: The domain at which session cookie will operate in.
- path: The path that the cookie will operate in.
- httponly
- secure
- samesite
Parameters:
- boolean $forceUpdate Set to true if the language is set and want to reset it. The reset process depends on the attribute 'lang'. It can be send via 'get' request, 'post' request or a cookie. If no language code is provided and the parameter '$forceUpdate' is set to true, 'EN' will be used. If the given language code is not in the given array and the parameter '$forceUpdate' is set to true, 'EN' will be used.
Parameters:
- string $varName The name of the variable that has the value.
Parameters:
- string $varName The name of the variable.
Parameters:
- string $varName The name of the variable.
Parameters:
- string $name The name of the variable. Must be non-empty string.
- mixed $val The value of the variable. It can be any thing.
Parameters:
- int $time Session duration in minutes.
Parameters:
- boolean $bool If set to true, timeout time will be refreshed. Note that the property will be updated only if the session is running.
Parameters:
- string $val It can be one of the following values, 'Lax', 'Strict' or 'None'. If any other value is provided, it will be ignored.
Parameters:
- User $userObj An object of type 'User'.
Parameters:
- string $serialized The serialized session as string.