flextype-components / session
Session Component provides basic methods to work with session.
Installs: 5 323
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: ^7.1.3
This package is auto-updated.
Last update: 2024-10-25 10:23:07 UTC
README
Installation
composer require flextype-components/session
Usage
Start the session.
Session::start();
Delete one or more session variables.
Session::delete('user');
Destroy the session.
Session::destroy();
Check if a session variable exists.
if (Session::exists('user')) { // Do something... }
Get a variable that was stored in the session.
echo Session::get('user');
Return the sessionID.
echo Session::getSessionId();
Store a variable in the session.
Session::set('user', 'Awilum');
License
See LICENSE