tsufeki / react-line-stream
Line-by-line stream reading for React PHP
Installs: 3 907
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 1
Open Issues: 1
Requires
- evenement/evenement: ^3.0 || ^2.0
- react/stream: ^1.0 || ^0.7
This package is auto-updated.
Last update: 2025-03-01 00:43:09 UTC
README
Line-by-line stream reading for React PHP.
It's line
event gets fired only with single full line of text (EOL included).
Example
$loop = React\EventLoop\Factory::create(); $file = new React\Stream\Stream(fopen('foo.txt', 'r'), $loop); $lineStream = new ReactLineStream\LineStream($file); $lineStream->on('line', function ($line) { echo 'line: ' . $line; }); $loop->run();