Skip to content

A Implementation of the PSR-7 StreamInterface

License

Notifications You must be signed in to change notification settings

open-source-contributions/streams

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travis Packagist GitHub license Packagist

💾 Streams for PHP

This package provides some implementations of the PSR-7 StreamInterface.

📦 Installation

You can install this package using composer:

$ composer require mintware-de/streams

📄 FileStream

Provides read / write access for files.

use \MintWare\Streams\FileStream;
$stream = new FileStream($filename, $readable = true, $writable = true);

💻 MemoryStream

With this implementation you can read data from and write data to the memory.

use \MintWare\Streams\MemoryStream;
$stream = new MemoryStream($initialData = '');

📥 InputStream

Provides read-only access for the php://input resource. This holds for example the raw HTTP request.

use \MintWare\Streams\InputStream;
$stream = new InputStream();

📤 OutputStream

Provides write-only access for the php://output resource.

use \MintWare\Streams\OutputStream;
$stream = new OutputStream();

🧪 Unit Tests

$ phpunit

⭐️ Rating

Don't forget to hit the ⭐️-Star button if you find this package useful. Thanks 🙂

About

A Implementation of the PSR-7 StreamInterface

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%