Documentation

Session


The session helper.


start()


Starts the session.


Session::start();

exists()


Checks if a session variable exists.


if (Session::exists('user_id')) {
    // Do something...
}

get()


Gets a variable that was stored in the session.


echo Session::get('user_id');

getSessionId()


Returns the sessionID.


echo Session::getSessionId();

set(string $key, mixed $value)


Stores a variable in the session.


Session::set('user_login', 'Awilum');

delete()


Deletes one or more session variables.


Session::delete('user_id');

destroy()


Destroys the session.


Session::destroy();