PHPackages                             binfotech/streams - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. binfotech/streams

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

binfotech/streams
=================

A set of generic stream wrappers

05PHP

Since Nov 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/binfotech/Streams)[ Packagist](https://packagist.org/packages/binfotech/streams)[ RSS](/packages/binfotech-streams/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Streams
=======

[](#streams)

[![CI](https://github.com/binfotech/Streams/actions/workflows/ci.yaml/badge.svg)](https://github.com/binfotech/Streams/actions/workflows/ci.yaml)

Generic stream wrappers for php.

CallBackWrapper
---------------

[](#callbackwrapper)

A `CallBackWrapper` can be used to register callbacks on read, write and closing of the stream, it wraps an existing stream and can thus be used for any stream in php

The callbacks are passed in the stream context along with the source stream and can be any valid [php callable](http://php.net/manual/en/language.types.callable.php)

### Example

[](#example)

```
