geggleto/psr7-session

Inject Session Data into Request Object

0.2.0 2015-11-16 15:36 UTC

This package is auto-updated.

Last update: 2024-11-29 04:30:33 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