https://github.com/drago-ex/sessions
:cookie: Helper class for accessing Nette session and session sections outside presenters.
https://github.com/drago-ex/sessions
nette sessions
Last synced: about 1 month ago
JSON representation
:cookie: Helper class for accessing Nette session and session sections outside presenters.
- Host: GitHub
- URL: https://github.com/drago-ex/sessions
- Owner: drago-ex
- License: mit
- Created: 2016-02-04T08:47:20.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-12-30T07:55:55.000Z (6 months ago)
- Last Synced: 2026-02-17T21:54:36.147Z (4 months ago)
- Topics: nette, sessions
- Language: PHP
- Homepage:
- Size: 102 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# Drago Sessions
A helper package for managing sessions outside the presenter in Nette Framework.
[](https://github.com/drago-ex/sessions/blob/master/license)
[](https://badge.fury.io/ph/drago-ex%2Fsessions)
[](https://github.com/drago-ex/sessions/actions/workflows/tests.yml)
[](https://github.com/drago-ex/sessions/actions/workflows/coding-style.yml)
## Requirements
- PHP >= 8.3
- Nette Framework
- Composer
## Installation
```
composer require drago-ex/sessions
```
## Extension Registration
In your `neon` configuration, register the `ExtraSession` service:
```neon
service:
- Drago\Http\ExtraSession(@Nette\Http\Session, 'namespace')
```
## Examples
Setting session values
```php
// Setting a session value in the specified section.
$this->ExtraSession->getSessionSection()->set('key', 'value');
```
Reading session values
```php
// Getting a session value from the section.
$value = $this->ExtraSession->getSessionSection()->get('key');
```
## Features
- Provides access to Nette sessions and session sections outside the presenter.
- Ideal for managing session data in services or components within a Nette application.
## Knowledge
- [Sessions]([https://github.com/dg/dibi](https://doc.nette.org/en/http/sessions))