Session Component provides basic methods to work with session.

v1.1.1 2018-06-26 15:16 UTC

This package is auto-updated.

Last update: 2024-10-25 10:23:07 UTC


README

version MIT License

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