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.
Requires
- php: >=8.2
- flowaxy/cookie: ^1.0
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 viaFlowaxy\Cookie
if the library is available.
📌 Requirements
- PHP 8.2+
- Composer
- Optional:
flowaxy/cookie
🔗 Links
- GitHub: github.com/flowaxy/session
- Package: packagist.org/packages/flowaxy/session
- Cookie Manager: github.com/flowaxy/cookie
- Flowaxy CMS: flowaxy.dev
🏷️ Version
v1.0.0 — Stable
🧰 Follows Semantic Versioning (SemVer)
📃 License
Made with ❤️ for developers.