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

Other Useful Business Software
$300 Free Credits for Your Google Cloud Projects Icon
$300 Free Credits for Your Google Cloud Projects

Start building on Google Cloud with $300 in free credits. No commitment, no credit card required until you're ready to scale.

Launch your next project with $300 in free Google Cloud credits—no strings attached. Test, build, and deploy without risk. Use your credits across the entire Google Cloud platform to find what works best for your needs. After your credits are used, continue with always-free tier services. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Start Free Trial
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