Download the PHP package cspray/labrador-http without Composer
On this page you can find all versions of the php package cspray/labrador-http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package labrador-http
Labrador HTTP
Labrador HTTP is a framework for creating feature-rich, SOLID web applications. It is primarily a set of opinions on integrating the following libraries:
- amphp/http-server Provides the underlying server and HTTP-stack.
- cspray/annotated-container Provides a powerful dependency injection framework using PHP 8 Attributes.
- nikic/fast-route Provides the actual routing functionality that maps a Request to a Controller.
- cuyz/valinor Provides the ability to create DTO objects from a Request body.
This is not meant to be an exhaustive list of all dependencies, simply those involving major integration points.
Please check out the Quick Start below for more details on Labrador HTTP's novel features.
Install
Use Composer to install the library.
Quick Start
Labrador's most novel feature is its integration with Annotated Container to allow the following features:
- Inject specific parts of a Request into a controller method
- Inject custom DTO objects based on a JSON encoded body
- Specify route mapping using FastRoute and Attributes.
It's best to show a Controller implementing this functionality.
Request Injections
Labrador HTTP also provides the ability to get specific parts of the Request using a set of Attributes, or specific type mappings.
All versions of labrador-http with dependencies
ext-json Version *
amphp/http-server Version ~2.0.0-rc2
amphp/file Version ^1.0
cspray/labrador Version ~3.0.0-beta7
cspray/labrador-async-event Version 2.0.0-rc1
league/uri-schemes Version ~1.2
nikic/fast-route Version ~1.3
monolog/monolog Version ^1.24