joem/simple-session

Manage session information with a simple interface

v1.0.0 2021-06-18 19:10 UTC

This package is auto-updated.

Last update: 2024-04-19 01:38:21 UTC


README

I find array accessing in HTML ugly. This package was created through the pain of handling sessions in WordPress templates.

Usage

session_start();

require_once "vendor/autoload.php";

session_has('username'); // false

session_set('username', 'joe');

session_has('username'); // true

session_get('username'); // 'joe'

Alternatively, you can directly access the static class methods:

Coming soon

  • Flash session messages