Download the PHP package fast-forward/http-factory without Composer
On this page you can find all versions of the php package fast-forward/http-factory. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fast-forward/http-factory
More information about fast-forward/http-factory
Files in fast-forward/http-factory
Package http-factory
Short Description Fast Forward PSR-7 HTTP Factory utility classes
License MIT
Homepage https://github.com/php-fast-forward
Informations about the package http-factory
FastForward HTTP Factory
A Fast Forward service provider and helper-factory package for PSR-17 and PSR-7 HTTP objects, built on top of Nyholm PSR-7 and Nyholm ServerRequestCreator.
Designed to work out of the box with the php-fast-forward/container autowiring system.
📦 Installation
Features
- Reuses one
Nyholm\Psr7\Factory\Psr17Factoryinstance for the standard PSR-17 interfaces - Registers
Nyholm\Psr7Server\ServerRequestCreatorand exposesServerRequestInterface::classviafromGlobals() - Exposes
FastForward\Http\Message\Factory\ResponseFactoryInterfacefor HTML, JSON, text, redirect, and no-content helpers - Exposes
FastForward\Http\Message\Factory\StreamFactoryInterfacefor payload-aware JSON stream helpers - Keeps returned objects PSR-7 compatible
Usage
There are two similarly named response and stream factory interfaces:
Psr\Http\Message\ResponseFactoryInterfaceandPsr\Http\Message\StreamFactoryInterfacefor plain PSR-17 behaviorFastForward\Http\Message\Factory\ResponseFactoryInterfaceandFastForward\Http\Message\Factory\StreamFactoryInterfacefor Fast Forward helper methods
If you’re using fast-forward/container:
Services Registered
The following services will be automatically registered in your container when using HttpMessageFactoryServiceProvider:
| Service Interface | Implementation Source |
|---|---|
Psr\Http\Message\RequestFactoryInterface |
Nyholm\Psr7\Factory\Psr17Factory (via alias) |
Psr\Http\Message\ResponseFactoryInterface |
Nyholm\Psr7\Factory\Psr17Factory (via alias) |
Psr\Http\Message\ServerRequestFactoryInterface |
Nyholm\Psr7\Factory\Psr17Factory (via alias) |
Psr\Http\Message\StreamFactoryInterface |
Nyholm\Psr7\Factory\Psr17Factory (via alias) |
Psr\Http\Message\UploadedFileFactoryInterface |
Nyholm\Psr7\Factory\Psr17Factory (via alias) |
Psr\Http\Message\UriFactoryInterface |
Nyholm\Psr7\Factory\Psr17Factory (via alias) |
Nyholm\Psr7Server\ServerRequestCreatorInterface |
Nyholm\Psr7Server\ServerRequestCreator (via alias) |
FastForward\Http\Message\Factory\ResponseFactoryInterface |
FastForward\Http\Message\Factory\ResponseFactory (via alias) |
FastForward\Http\Message\Factory\StreamFactoryInterface |
FastForward\Http\Message\Factory\StreamFactory (via alias) |
Nyholm\Psr7\Factory\Psr17Factory |
Registered via InvokableFactory |
Nyholm\Psr7Server\ServerRequestCreator |
Registered via InvokableFactory, with dependencies |
FastForward\Http\Message\Factory\ResponseFactory |
Registered via InvokableFactory |
FastForward\Http\Message\Factory\StreamFactory |
Registered via InvokableFactory |
Psr\Http\Message\ServerRequestInterface |
Created by calling fromGlobals() on ServerRequestCreator via MethodFactory |
Documentation
The Sphinx documentation under docs/ covers:
- beginner installation and quickstart flows
- concrete
ResponseFactoryandStreamFactoryclasses - common response and payload-stream scenarios
- alias mapping, compatibility, dependencies, and troubleshooting
License
This package is open-source software licensed under the MIT License.
Contributing
Contributions, issues, and feature requests are welcome!
Feel free to open a GitHub Issue or submit a Pull Request.
All versions of http-factory with dependencies
fast-forward/container Version ^1.5
fast-forward/http-message Version ^1.2
nyholm/psr7-server Version ^1.1
psr/http-factory Version ^1.1