PHPackages                             effectra/http-foundation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. effectra/http-foundation

ActiveLibrary[HTTP &amp; Networking](/categories/http)

effectra/http-foundation
========================

The Effectra HTTP Foundation package.

v1.0.4(2y ago)0402MITPHP

Since Jun 19Pushed 2y agoCompare

[ Source](https://github.com/effectra/http-foundation)[ Packagist](https://packagist.org/packages/effectra/http-foundation)[ RSS](/packages/effectra-http-foundation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (2)

Effectra\\Http\\Foundation
==========================

[](#effectrahttpfoundation)

Effectra\\Http\\Foundation is a package that provides foundation classes for handling HTTP requests and responses.

Installation
------------

[](#installation)

You can install this package via Composer. Run the following command in your terminal:

```
composer require effectra/http-foundation
```

Classes
-------

[](#classes)

The package includes the following classes:

### RequestFoundation

[](#requestfoundation)

The `RequestFoundation` class provides a foundation for creating PSR-7 compliant server request objects from PHP's global variables.

#### Usage

[](#usage)

```
use Effectra\Http\Foundation\RequestFoundation;
use Effectra\Contracts\Http\RequestFoundationInterface;

// Create a server request object from globals
$request = RequestFoundation::createFromGlobals();

// Access request attributes, query parameters, etc.
$path = $request->getUri()->getPath();
$queryParams = $request->getQueryParams();

// ... Add your code to handle the request ...
```

### ResponseFoundation

[](#responsefoundation)

The `ResponseFoundation` class provides a foundation for sending PSR-7 compliant response objects.

#### Usage

[](#usage-1)

```
use Effectra\Http\Foundation\ResponseFoundation;
use Effectra\Contracts\Http\ResponseFoundationInterface;

// Create a response object
$response = new ResponseFoundation($content, $statusCode, $headers);

// Send the response
ResponseFoundation::send($response);
```

### UploadedFileFoundation

[](#uploadedfilefoundation)

The `UploadedFileFoundation` class provides a foundation for representing uploaded files in HTTP requests.

#### Usage

[](#usage-2)

```
use Effectra\Http\Foundation\UploadedFileFoundation;
use Effectra\Contracts\Http\UploadedFileFoundationInterface;

// Create an uploaded file object
$uploadedFile = new UploadedFileFoundation($stream, $size, $error, $clientFilename, $clientMediaType);

// Access uploaded file properties
$stream = $uploadedFile->getStream();
$size = $uploadedFile->getSize();
$error = $uploadedFile->getError();
$clientFilename = $uploadedFile->getClientFilename();
$clientMediaType = $uploadedFile->getClientMediaType();

// ... Add your code to handle the uploaded file ...
```

Contributing
------------

[](#contributing)

Contributions are welcome! If you have any bug reports, feature requests, or suggestions, please open an issue on the [GitHub repository](https://github.com/effectra/http-foundation).

License
-------

[](#license)

This package is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~29 days

Total

5

Last Release

946d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e6219ae87e98df8783b2f595b013035dd183c0712afd24045a8acf0a40c3bdf?d=identicon)[effectra](/maintainers/effectra)

---

Top Contributors

[![BMTmohammedtaha](https://avatars.githubusercontent.com/u/95439605?v=4)](https://github.com/BMTmohammedtaha "BMTmohammedtaha (12 commits)")

---

Tags

factoryfoundationhttphttp-fouphppsrpsr7requestresponsestreamuploadfuri

### Embed Badge

![Health badge](/badges/effectra-http-foundation/health.svg)

```
[![Health](https://phpackages.com/badges/effectra-http-foundation/health.svg)](https://phpackages.com/packages/effectra-http-foundation)
```

###  Alternatives

[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

538204.9M23](/packages/league-uri-interfaces)[relay/relay

A PSR-15 server request handler.

3302.1M86](/packages/relay-relay)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
