Download the PHP package middlewares/php-session without Composer
On this page you can find all versions of the php package middlewares/php-session. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download middlewares/php-session
More information about middlewares/php-session
Files in middlewares/php-session
Package php-session
Short Description Middleware to start php sessions using the request data
License MIT
Homepage https://github.com/middlewares/php-session
Informations about the package php-session
middlewares/php-session
Middleware to start a php session using the request data and close it after returning the response. Reads and writes session cookies in the PSR-7 request/response.
Requirements
- PHP >= 7.2
- A PSR-7 http message implementation
- A PSR-15 middleware dispatcher
Installation
This package is installable and autoloadable via Composer as middlewares/php-session.
Example
Usage
This is a middleware to start the native PHP session using the cookies of the server request.
name
The session name. If it's not provided, use the php's default name (PHPSESSID). More info session_name
id
This option set a session id. If it's not provided, use the request's cookies to get it.
options
This allows to set an of options passed to session_start()
regenerateId
This option regenerates the id after a specific time interval. The latest regeneration time is saved in the key session-id-expires
but you can change it in the second argument:
Please see CONTRIBUTING for contributing details.
The MIT License (MIT). Please see LICENSE for more information.