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
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
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