Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geggleto/psr7-session
Middleware to expose your SESSION stuff to Requests
https://github.com/geggleto/psr7-session
Last synced: 5 days ago
JSON representation
Middleware to expose your SESSION stuff to Requests
- Host: GitHub
- URL: https://github.com/geggleto/psr7-session
- Owner: geggleto
- License: mit
- Created: 2015-11-13T19:00:28.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-16T15:37:18.000Z (about 9 years ago)
- Last Synced: 2023-08-16T22:17:05.838Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 0 Bytes
- Stars: 7
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## Session Middleware
This middleware injects your middleware contents into the Request Object.
## Usage
```php
$app->add(new \Geggleto\Middleware\Session('session_name'));
```## Example
```php
//In your Session you have
[
'user' => 1
]//Then in your Request Object, if you want your User ID...
$request->getAttribute('user') === 1
```