This repository contains a full PSR-7 message implementation, several stream decorators, and some helpful functionality like query string parsing. This package comes with a number of stream implementations and stream decorators. Reads from multiple streams, one after the other. Provides a buffer stream that can be written to fill a buffer, and read from to remove bytes from the buffer. This stream returns a "hwm" metadata value that tells upstream consumers what the configured high water mark of the stream is, or the maximum preferred size of the buffer. The CachingStream is used to allow seeking over previously read bytes on non-seekable streams. This can be useful when transferring a non-seekable entity body fails due to needing to rewind the stream (for example, resulting from a redirect). Data that is read from the remote stream will be buffered in a PHP temp stream so that previously read bytes are cached first in memory, then on disk.

Features

  • Compose stream implementations based on a hash of functions
  • Allows for easy testing and extension of a provided stream without needing to create a concrete class for a simple extension point
  • Use PHP's zlib.inflate filter to inflate zlib (HTTP deflate, RFC1950) or gzipped (RFC1952) content
  • Lazily reads or writes to a file that is opened only after an IO operation take place on the stream
  • LimitStream can be used to read a subset or slice of an existing stream object
  • Provides a read only stream that pumps data from a PHP callable.

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow PSR-7

PSR-7 Web Site

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of PSR-7!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Libraries

Registered

2021-08-03