Skip to content

atakde/psession

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

psession

PHP library for handling sessions

Installation

Install via composer

composer require atakde/psession

Usage

<?php

require_once __DIR__ . '/vendor/autoload.php';

use Atakde\PSession\PSession;

// http only true
$session = new PSession([
    'cookie_httponly' => true,
]);

$session->start();
$session->set('name', 'John');
echo $session->get('name');

$session->destroy();

Features

  • Allowed dot notation both get & set
Session::get('user.name');
Session::set('user.name', 'Testing');