delboy1978uk/session

Secure Session Manager for PHP™

v1.6.3 2024-01-13 17:21 UTC

README

Latest Stable Version Total Downloads License build status Code Coverage Scrutinizer Code Quality

A reasonably secure session manager for PHP

Installation

Use composer:

composer require delboy1978uk/session

Usage

use Del\SessionManager;

// Starting the session - also takes a name argument
SessionManager::sessionStart();

// Setting a variable
SessionManager::set('name', 'DelBoy');

// Check a session variable exists
$hasName = SessionManger::has('name');

// Getting a variable
$name = SessionManger::get('name');

// Unsetting a variable
SessionManager::destroy('name');

// Ending the session
SessionManager::destroySession();