Download the PHP package juhara/zzzstream without Composer
On this page you can find all versions of the php package juhara/zzzstream. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download juhara/zzzstream
More information about juhara/zzzstream
Files in juhara/zzzstream
Download juhara/zzzstream
More information about juhara/zzzstream
Files in juhara/zzzstream
Vendor juhara
Package zzzstream
Short Description PSR-7 StreamInterface implementation collection
License Apache-2.0
Package zzzstream
Short Description PSR-7 StreamInterface implementation collection
License Apache-2.0
Please rate this library. Is it a good library?
Informations about the package zzzstream
zzzstream
PSR-7 StreamInterface implementation collection
Requirement
Installation
Run through composer
$ composer require juhara/zzzstream
Available StreamInterface implementation
StringStream
string-based StreamInterface implementation.ReadOnlyStringStream
read-only string-based StreamInterface implementation.WriteOnlyStringStream
write-only string-based StreamInterface implementation.WrapperStream
decorator class that implements StreamInterface which does nothing except wraps other StreamInterface instance.ReadOnlyStream
decorator class that turn other StreamInterface into read only stream.WriteOnlyStream
decorator class that turn other StreamInterface into write only stream.FileStream
file-based StreamInterface implementation.TempStream
temporary stream StreamInterface implementation.
How to use
Create stream instance from string
<?php
use Juhara\ZzzStream\StringStream;
...
$stream = new StringStream('hello world');
//replace PSR-7 ResponseInterface instance with new body
$newResponse = $response->withBody($stream);
Create read-only string stream instance
<?php
use Juhara\ZzzStream\ReadOnlyStringStream;
...
$stream = new ReadOnlyStringStream('hello world');
//replace PSR-7 ResponseInterface instance with new body
$newResponse = $response->withBody($stream);
Force string stream instance to become read-only
<?php
use Juhara\ZzzStream\StringStream;
use Juhara\ZzzStream\ReadOnlyStream;
...
$stream = new ReadOnlyStream(new StringStream('hello world'));
//replace PSR-7 ResponseInterface instance with new body
$newResponse = $response->withBody($stream);
Unit Test
To run unit test, copy phpunit.xml.dist
to phpunit.xml
and run
$ ./vendor/bin/phpunit
Contributing
If you have any improvement or issues please submit PR.
Thank you.
All versions of zzzstream with dependencies
PHP Build Version
Package Version
The package juhara/zzzstream contains the following files
Loading the files please wait ....