composer require flextype-components/session
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');
See LICENSE