PHP Classes

How to Access Resources using HTTP Compliant with PHP PSR 17 Standard using Fatfree PSR 17: Handle HTTP requests complying with PSR 17

Recommend this page to a friend!

  Author Author  
Picture of Christian Knuth
Name: Christian Knuth <contact>
Classes: 1 package by
Country: Germany Germany
Age: ???
All time rank: 4466238 in Germany Germany
Week rank: 553 Up28 in Germany Germany Up


  Detailed description   Download Download .zip .tar.gz  
This package can handle HTTP requests complying with PSR 17.

It provides implementation classes for handling HTTP requests with interfaces defined by the PHP Framework Interoperability Group.

The package provides classes for:

- Storing HTTP message information

- Handling HTTP requests

- Generating HTTP responses

- Processing HTTP server requests

- Accessing HTTP servers as streams

- Manipulating URIs

- Handling file uploads

Details

Fat-Free PSR-7 implementation

This is a lightweight PSR-7 implementation for PHP 8.0+.

Installation

composer require f3-factory/fatfree-psr7

Usage

The package includes a PSR-17 factory and also supports HTTPlug.

Use these factories according to specs to create Request, Response, Uri, Stream objects.

Tests

Run the test suite:

composer test

NB: Custom tests were mostly taken from Nyholm/psr7.

Benchmarks

Benchmarks done with devanych/psr-http-benchmark on php 8.0+.

Test results (Intel Xeon Gold 6140 CPU @ 2.30GHz, 4 cores):

| Runs: 50,000 | Guzzle | HttpSoft | Laminas | Nyholm | Slim | Fatfree | |----------------------|-----------|-----------|-----------|-----------|-----------|-----------| | Runs per second | 18599 | 31938 | 22601 | 27999 | 18789 | 35200 | | Average time per run | 0.0538 ms | 0.0313 ms | 0.0442 ms | 0.0357 ms | 0.0532 ms | 0.0284 ms | | Total time | 2.6882 s | 1.5655 s | 2.2122 s | 1.7858 s | 2.6611 s | 1.4204 s |


  Classes of Christian Knuth  >  How to Access Resources using HTTP Compliant with PHP PSR 17 Standard using Fatfree PSR 17  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: How to Access Resources using HTTP Compliant with PHP PSR 17 Standard using Fatfree PSR 17
Base name: fatfree-psr7
Description: Handle HTTP requests complying with PSR 17
Version: -
PHP version: 8
License: MIT/X Consortium License
All time users: 24 users
All time rank: 10780
Week users: 0 users
Week rank: 157 Equal
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
Group folder image HTTP HTTP protocol clients, headers and cookies View top rated classes
Group folder image PSR Packages that implement PHP Standard Recommendations by FIG View top rated classes
Group folder image PHP 8 Classes using PHP 8 specific features View top rated classes


  User ratings  
Not yet rated by the users

  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Files folder imagetests (6 files, 3 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageHttp (7 files, 1 directory)

  Files folder image Files  /  src  /  Http  
File Role Description
Files folder imageFactory (2 files)
  Plain text file Message.php Class Class source
  Plain text file Request.php Class Class source
  Plain text file Response.php Class Class source
  Plain text file ServerRequest.php Class Class source
  Plain text file Stream.php Class Class source
  Plain text file UploadedFile.php Class Class source
  Plain text file Uri.php Class Class source

  Files folder image Files  /  src  /  Http  /  Factory  
File Role Description
  Plain text file HTTPlug.php Class Class source
  Plain text file Psr17Factory.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageFactory (2 files)
Files folder imageIntegration (6 files)
Files folder imageResources (1 file)
  Plain text file RequestTest.php Class Class source
  Plain text file ResponseTest.php Class Class source
  Plain text file ServerRequestTest.php Class Class source
  Plain text file StreamTest.php Class Class source
  Plain text file UploadedFileTest.php Class Class source
  Plain text file UriTest.php Class Class source

  Files folder image Files  /  tests  /  Factory  
File Role Description
  Plain text file HttplugFactoryTest.php Class Class source
  Plain text file Psr17FactoryTest.php Class Class source

  Files folder image Files  /  tests  /  Integration  
File Role Description
  Plain text file RequestTest.php Class Class source
  Plain text file ResponseTest.php Class Class source
  Plain text file ServerRequestTest.php Class Class source
  Plain text file StreamTest.php Class Class source
  Plain text file UploadedFileTest.php Class Class source
  Plain text file UriTest.php Class Class source

  Files folder image Files  /  tests  /  Resources  
File Role Description
  Accessible without login Plain text file foo.txt Doc. Documentation

Download Download all files: fatfree-psr7.tar.gz fatfree-psr7.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Files folder imagetests (6 files, 3 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageHttp (7 files, 1 directory)

  Files folder image Files  /  src  /  Http  
File Role Description
Files folder imageFactory (2 files)
  Plain text file Message.php Class Class source
  Plain text file Request.php Class Class source
  Plain text file Response.php Class Class source
  Plain text file ServerRequest.php Class Class source
  Plain text file Stream.php Class Class source
  Plain text file UploadedFile.php Class Class source
  Plain text file Uri.php Class Class source

  Files folder image Files  /  src  /  Http  /  Factory  
File Role Description
  Plain text file HTTPlug.php Class Class source
  Plain text file Psr17Factory.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageFactory (2 files)
Files folder imageIntegration (6 files)
Files folder imageResources (1 file)
  Plain text file RequestTest.php Class Class source
  Plain text file ResponseTest.php Class Class source
  Plain text file ServerRequestTest.php Class Class source
  Plain text file StreamTest.php Class Class source
  Plain text file UploadedFileTest.php Class Class source
  Plain text file UriTest.php Class Class source

  Files folder image Files  /  tests  /  Factory  
File Role Description
  Plain text file HttplugFactoryTest.php Class Class source
  Plain text file Psr17FactoryTest.php Class Class source

  Files folder image Files  /  tests  /  Integration  
File Role Description
  Plain text file RequestTest.php Class Class source
  Plain text file ResponseTest.php Class Class source
  Plain text file ServerRequestTest.php Class Class source
  Plain text file StreamTest.php Class Class source
  Plain text file UploadedFileTest.php Class Class source
  Plain text file UriTest.php Class Class source

  Files folder image Files  /  tests  /  Resources  
File Role Description
  Accessible without login Plain text file foo.txt Doc. Documentation

Download Download all files: fatfree-psr7.tar.gz fatfree-psr7.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.