geggleto/sessionmiddleware

This package is abandoned and no longer maintained. The author suggests using the https://github.com/geggleto/psr7-session package instead.

Inject Session Data into Request Object

0.2.0 2015-11-16 15:36 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:52:56 UTC


README

This middleware injects your middleware contents into the Request Object.

Usage

$app->add(new \Geggleto\Middleware\Session('session_name'));

Example

//In your Session you have
[
    'user' => 1
]

//Then in your Request Object, if you want your User ID...

$request->getAttribute('user') === 1