Implementation of slendium/http based on the PHP superglobals. https://www.slendium.org
Find a file
C. Fahner dea7947e6b Add GlobalResponse (#7)
Resolves #2.

Adds the GlobalResponse utility.

Reviewed-on: #7
2026-06-30 06:58:17 +02:00
src Add GlobalResponse (#7) 2026-06-30 06:58:17 +02:00
tests Add GlobalResponse (#7) 2026-06-30 06:58:17 +02:00
.gitignore Add GlobalRequest (#3) 2026-06-27 10:29:59 +02:00
composer.json Add GlobalRequest (#3) 2026-06-27 10:29:59 +02:00
composer.lock Add GlobalRequest (#3) 2026-06-27 10:29:59 +02:00
LICENSE Initial commit 2025-11-07 10:19:30 +00:00
phpstan.neon Add GlobalRequest (#3) 2026-06-27 10:29:59 +02:00
phpunit.xml Add GlobalRequest (#3) 2026-06-27 10:29:59 +02:00
README.md Add GlobalResponse (#7) 2026-06-30 06:58:17 +02:00

Slendium HTTP-Superglobals

Implementation of the slendium/http library.

Incoming requests are based on the PHP superglobals ($_GET, $_POST, $_FILES, $_COOKIE and $_SERVER) and responses can be printed to the output buffer (using header() and echo).

Installation

Simply run composer require slendium/http-superglobals to add it to your project.

Usage

From your PHP script, simply create a new instance of the GlobalRequest object and use it wherever a Slendium\Http\Request is expected.

// instance wrapped in networking information, returns a Networked<Request>
$request = GlobalRequest::createNetworkedInstance();

// regular instance
$request = new GlobalRequest;

// use the request
$response = MyFramework::respond($request);

// output the response
GlobalResponse::output($response);