Download the PHP package k-ko/slim3-session-middleware without Composer
On this page you can find all versions of the php package k-ko/slim3-session-middleware. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download k-ko/slim3-session-middleware
More information about k-ko/slim3-session-middleware
Files in k-ko/slim3-session-middleware
Package slim3-session-middleware
Short Description Session middleware and helper for Slim 3.
License MIT
Homepage https://github.com/k-ko/slim3-session-middleware
Informations about the package slim3-session-middleware
Slim3 Session Middleware
Simple session middleware for the Slim Framework. Also included is a useful helper class that allows PHP built-in session management.
Forked from https://github.com/andrewdyer/slim3-session-middleware
License
Licensed under MIT. Totally free for private or commercial projects.
Installation
Usage
Supported Options
| Option | Type | Default | Description |
|---|---|---|---|
autorefresh |
boolean | false |
If you want session to be refresh when user activity is made (interaction with server). |
domain |
tring | null |
Cookie domain, for example 'www.php.net'. To make cookies visible on all subdomains then the domain must be prefixed with a dot like '.php.net'. |
handler |
mixed | null |
Custom session handler class or object. Must implement SessionHandlerInterface as required by PHP. |
httponly |
boolean | false |
If set to true then PHP will attempt to send the httponly flag when setting the session cookie. |
ini_settings |
array | null |
Associative array of custom session configuration. |
lifetime |
int or string | "20 minutes" |
The lifetime of the session cookie. Can be set to any value which strtotime can parse. |
name |
string | "session" |
Name for the session cookie. Defaults to session instead of PHP's PHPSESSID. |
path |
string | "/" |
The path on the domain where the cookie will work. Use a single slash ('/') for all paths on the domain. |
secure |
boolean | false |
Cookies will only be sent over secure connections if true. |
Session Helper
The \Session\Helper class can be attached to your app container:
The helper class can be used to check if a session variable exists in addition to setting, getting and deleting session variables.
Support
If you believe you have found an issue, please report it using the issue tracker, or better yet, fork the repository and submit a pull request.