Skip to content

tsufeki/react-line-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Line Stream

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();

About

Line-by-line stream reading for React PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages