flowaxy/session

Lightweight PHP library for managing sessions with a simple API. Ideal for use in CMS Flowaxy, landing pages, and any modern PHP web projects.

v1.0.0 2025-04-21 16:41 UTC

This package is not auto-updated.

Last update: 2025-05-07 04:33:40 UTC


README

Flowaxy Session is a lightweight PHP library for secure and easy session management.
Perfect for Flowaxy CMS, landing pages, web apps, and custom PHP projects.

✨ Features

✅ Simple session initialization
✅ Namespaced keys to prevent conflicts (s_key)
✅ Clean API: start(), set(), get(), remove(), destroy()
✅ Auto-integration with flowaxy/cookie
✅ Compatible with PHP 8.2+

⚙️ Installation

Install via Composer:

composer require flowaxy/session

Dependency: To enable full functionality (like cookie cleanup), install flowaxy/cookie:

composer require flowaxy/cookie

🧪 Usage Example

use Flowaxy\Session;

// Start session
Session::start();

// Set value
Session::set('user_id', 42);

// Get value
$userId = Session::get('user_id');

// Remove value
Session::remove('user_id');

// Destroy session
Session::destroy();

💡 destroy() also clears the cookie via Flowaxy\Cookie if the library is available.

📌 Requirements

🔗 Links

🏷️ Version

v1.0.0 — Stable
🧰 Follows Semantic Versioning (SemVer)

📃 License

MIT License

Made with ❤️ for developers.