Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/drago-ex/sessions

:cookie: Using sessions outside the presenter. (@nette)
https://github.com/drago-ex/sessions

nette sessions

Last synced: about 2 months ago
JSON representation

:cookie: Using sessions outside the presenter. (@nette)

Awesome Lists containing this project

README

        

## Drago Sessions
Using session outside the presenter.

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://raw.githubusercontent.com/drago-ex/sessions/master/license.md)
[![PHP version](https://badge.fury.io/ph/drago-ex%2Fsessions.svg)](https://badge.fury.io/ph/drago-ex%2Fsessions)
[![Tests](https://github.com/drago-ex/sessions/actions/workflows/tests.yml/badge.svg)](https://github.com/drago-ex/sessions/actions/workflows/tests.yml)
[![Coding Style](https://github.com/drago-ex/sessions/actions/workflows/coding-style.yml/badge.svg)](https://github.com/drago-ex/sessions/actions/workflows/coding-style.yml)
[![CodeFactor](https://www.codefactor.io/repository/github/drago-ex/sessions/badge)](https://www.codefactor.io/repository/github/drago-ex/sessions)
[![Coverage Status](https://coveralls.io/repos/github/drago-ex/sessions/badge.svg?branch=master)](https://coveralls.io/github/drago-ex/sessions?branch=master)

## Technology
- PHP 8.1 or higher
- composer

## Knowledge
- [Sessions]([https://github.com/dg/dibi](https://doc.nette.org/en/http/sessions))

## Installation
```
composer require drago-ex/sessions
```

## Service registration
```neon
service:
- Drago\Http\ExtraSession(@Nette\Http\Session, 'namespace')
```

## Use
```php
// Setting values.
$this->ExtraSession->getSessionSection()->set('value');

// Reading values.
$this->ExtraSession->getSessionSection()->get();
```