Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 3, 2024 via composer

psr/http-server-middleware 1.0.2

Common interface for HTTP server-side middleware
Package summary
Share
0
issues
1
license
2
MIT
Package created
22 Jan 2018
Version published
11 Apr 2023
Maintainers
1
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
psr/http-server-handler@1.0.2
psr/http-server-middleware@1.0.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of psr/http-server-middleware 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
psr/http-server-handler1.0.22.65 kBMIT
prod

Visualizations

Frequently Asked Questions

What does psr/http-server-middleware do?

The PHP package psr/http-server-middleware provides a common interface for server-side HTTP middleware, according to PSR-15 (HTTP Server Request Handlers). This package itself is not a middleware implementation, but rather it describes what an HTTP server middleware should look like.

How do you use psr/http-server-middleware?

Utilizing the psr/http-server-middleware requires understanding of PSR-15 standards and PHP programming. As an interface, it may be used to define the structure for your middleware classes. While the package's readme doesn't provide a specific example, a general usage may look like this:

class YourMiddleware implements Psr\Http\Server\MiddlewareInterface
{
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        // Your middleware logic here

        return $handler->handle($request);
    }
}

In the above code, YourMiddleware class is implementing the MiddlewareInterface, abiding by the rules defined by PSR-15. The process(...) function is where the logic of your middleware would reside.

Where are the psr/http-server-middleware docs?

Detailed documents and the description of the psr/http-server-middleware package can be found at the PSR official website here. Packagist also lists this package here and the related implementations here, where further reading and relevant information can be obtained.

All Versions