Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Repository files navigation

Latest Stable VersionBuild StatusTotal DownloadsLicensePHP 7 readyCode ClimateScrutinizer CQ

DrMVC\Session

Module for working with PHP sessions.

composer require drmvc/session

How to use

More examples you can find here.

<?phprequire_once__DIR__ . '/../vendor/autoload.php';
useDrMVC\Session;
// Create session object, you can also set prefix// as first argument of Session class$session = newSession();
// Init session object$session->init();
// Get ID of current session$session_id = $session->id();
// Set few keys in session$session
->set('text', 'value')
->set('integer', 123)
->set('boolean', true)
->set('array', ['mama', 'ama', 'criminal']);
// Receive variables of current session$keys = $session->display();
var_dump($keys);
// Get some single value by key$value = $session->get('integer');
var_dump($value);

About PHP Unit Tests

First need to install all dev dependencies via composer update, then you can run tests by hands from source directory via ./vendor/bin/phpunit command.

Links

About

Collection of classes seestion management

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages