lantern-lighthouse / responsivity
HTTP Response Utility Library
Package info
github.com/Lantern-Lighthouse/Responsivity
pkg:composer/lantern-lighthouse/responsivity
1.1.0
2026-01-20 20:32 UTC
Requires
- php: >=8.1
- bcosca/fatfree-core: ^3.8
Requires (Dev)
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2026-03-20 20:56:37 UTC
README
A lightweight PHP library for handling HTTP responses, rendering templates, and managing configuration in Fat-Free Framework applications.
Installation
composer require lantern-lighthouse/responsivity
Usage
JSON Responses
use Responsivity\Responsivity; // Simple success response Responsivity::respond(['success' => true, 'data' => $data]); // Error response Responsivity::respond( ['error' => 'Not found'], Responsivity::HTTP_Not_Found ); // Created response Responsivity::respond( ['id' => 123, 'message' => 'Resource created'], Responsivity::HTTP_Created );
Template Rendering
$f3 = \Base::instance(); Responsivity::render($f3, 'pages/home.html');
Configuration Management
$f3 = \Base::instance(); Responsivity::updateConfigValue($f3, 'database.host', 'localhost'); Responsivity::updateConfigValue($f3, 'app.debug', true);
Requirements
- PHP 8.1 or higher
- Fat-Free Framework 3.8 or higher
License
GPL-3.0 License