pajaeu / session
There is no license information available for the latest version (1.0) of this package.
1.0
2023-10-08 11:44 UTC
Requires (Dev)
- phpunit/phpunit: ^10
This package is not auto-updated.
Last update: 2024-09-09 14:34:28 UTC
README
Simple PHP library for session handling
Instalation
composer require pajaeu/session
How to use
Starting session
Session::start();
Sets variable by key
Session::set('key', 'value');
Gets session variable by key
$value = Session::get('key');
Checks if session variable exists
$check = Session::has('key');
Removes session variable if exists
Session::remove('key');
Gets session id
$id = Session::id();
Regenerates session id
Session::regenerate();
Clears whole session
Session::clear();
Sets flash message
Flash::set('success', 'message');
Returns all flashes and deletes them from Session
$flashes = Flash::get();