WOK Stream handler component
This library is a Stream handler., (*1)
Diclaimer : This component is part of the WOK (Web Operational Kit) framework. It however can be used as a standalone library., (*2)
It is recommanded to install that component as a dependency using Composer :, (*3)
composer require wok/stream
You're also free to get it with git or by direct download while this package has no dependencies., (*4)
git clone https://github.com/web-operational-kit/stream.git
``` php use \WOK\Stream\Stream;, (*5)
/** * Instanciation * --- **/, (*6)
// Instanciate handler from a resource (default) $resource = fopen('php://temp', 'w+'); $stream = new Stream($resource);, (*7)
// Instanciate handler from a file $stream = Stream::createFromFile('/path/to/my/file.txt');, (*8)
// Instanciate handler from a string $stream = Stream::createFromString('here is my string');, (*9)