drago-ex/sessions

Helper class for accessing Nette session and session sections outside presenters.

Installs: 401

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/drago-ex/sessions

v1.0.6 2025-01-24 12:49 UTC

This package is auto-updated.

Last update: 2025-12-30 07:55:58 UTC


README

A helper package for managing sessions outside the presenter in Nette Framework.

License: MIT PHP version Tests Coding Style CodeFactor Coverage Status

Requirements

  • PHP >= 8.3
  • Nette Framework
  • Composer

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

Installation

composer require drago-ex/sessions

Service registration

In your neon configuration, register the ExtraSession service:

service:
	- Drago\Http\ExtraSession(@Nette\Http\Session, 'namespace')

Usage

Setting session values

// Setting a session value in the specified section.
$this->ExtraSession->getSessionSection()->set('key', 'value');

Reading session values

// Getting a session value from the section.
$value = $this->ExtraSession->getSessionSection()->get('key');