Session ManagerInterface implementation utilizing ext/session
Constructor
| Parameters: |
|
|---|---|
| Throws ExceptionRuntimeException: | |
Does a session exist and is it currently active?
| Return type: | bool |
|---|
Start session
if No session currently exists, attempt to start it. Calls {@link isValid()} once session_start() is called, and raises an exception if validation fails.
| Parameters: | bool – If set to true, current session storage will not be overwritten by the contents of $_SESSION. |
|---|---|
| Return type: | void |
| Throws : | ExceptionRuntimeException |
Destroy/end a session
| Parameters: | array – See {@link $defaultDestroyOptions} |
|---|---|
| Return type: | void |
Write session to save handler and close
Once done, the Storage object will be marked as isImmutable.
| Return type: | void |
|---|
Attempt to set the session name
If the session has already been started, or if the name provided fails validation, an exception will be raised.
| Parameters: | string – |
|---|---|
| Return type: | SessionManager |
| Throws : | ExceptionInvalidArgumentException |
Set session ID
Can safely be called in the middle of a session.
| Parameters: | string – |
|---|---|
| Return type: | SessionManager |
Regenerate id
Regenerate the session ID, using session save handler’s native ID generation Can safely be called in the middle of a session.
| Parameters: | bool – |
|---|---|
| Return type: | SessionManager |
Set the TTL (in seconds) for the session cookie expiry
Can safely be called in the middle of a session.
| Parameters: | null|int – |
|---|---|
| Return type: | SessionManager |
Set a 0s TTL for the session cookie
Can safely be called in the middle of a session.
| Return type: | SessionManager |
|---|
Is this session valid?
Notifies the Validator Chain until either all validators have returned true or one has failed.
| Return type: | bool |
|---|
Expire the session cookie
Sends a session cookie with no value, and with an expiry in the past.
| Return type: | void |
|---|