PHP Classes

PHP PSR-7 Implementation of Streams: Implements the access to data as defined in PSR-7

Recommend this page to a friend!
  Info   View files Documentation   View files View files (17)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 14 All time: 10,548 This week: 231Up
Version License PHP version Categories
streams 1.0MIT/X Consortium ...5PHP 5, Stream wrappers, PSR
Description Author

This package implements the access to data as defined in PSR-7.

It provides a base class that implements all the functions defined by the PSR-7 specification for all operations to read and write data to streams of any type.

The package also provides sub-classes to access several types of streamed data sources like files, memory, application input and output.

Picture of Julian Finkler
  Performance   Level  
Name: Julian Finkler <contact>
Classes: 8 packages by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

Details

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 ?

  Files folder image Files  
File Role Description
Files folder imagesrc (5 files)
Files folder imagetests (6 files)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
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 Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file FileStream.php Class Class source
  Plain text file InputStream.php Class Class source
  Plain text file MemoryStream.php Class Class source
  Plain text file OutputStream.php Class Class source
  Plain text file ResourceStream.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Accessible without login Plain text file autoload.php Aux. Auxiliary script
  Plain text file FileStreamTest.php Class Class source
  Plain text file InputStreamTest.php Class Class source
  Plain text file MemoryStreamTest.php Class Class source
  Plain text file OutputStreamTest.php Class Class source
  Plain text file ResourceStreamTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:14
This week:0
All time:10,548
This week:231Up
For more information send a message to info at phpclasses dot org.