crysalead/storage-stream
最新稳定版本:1.0.6
Composer 安装命令:
composer require crysalead/storage-stream
包简介
Object-Oriented API for PHP streams
关键字:
README 文档
README
Object-Oriented API for PHP streams (PSR-7 compatible).
Installation
composer require crysalead/storage-stream
Example
use Lead\Storage\Stream; $stream = new Stream(fopen('smiley.png', 'r')); $image = ''; while (!$stream->eof()) { $image .= $stream->read(); } echo $stream->mime(); // 'image/png'
Pipe Example
use Lead\Storage\Stream; $stream1 = new Stream("Hello"); $stream2 = new Stream("xxxxxWorld"); // copy the contents from the first stream to the second one $stream1->pipe($stream2); echo (string) $stream2; // 'HelloWorld'
Acknowledgements
Original implementation: Francois Zaninotto.
统计信息
- 总下载量: 19.91k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-04