6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
10/20/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#3551] CLI enhancement to read blocks from STDIN
*
Your Email Address
*
Spam protection
Enter the letters below:
. .. ..__ .__ .__ |\ ||\ |[ __[__)| \ | \|| \|[_./| \|__/
Comment
> To process the mail, in the mail-filter.php of the whups package, in > a memory-frieldly way, its necessary to read the input in blocks, > write them to a file, read the next part etc. instead of reading the > whole message into a variable at once. As now happens: > > > > $text = $cli->readStdin(); > > > > So I suppose an extension of the CLI in the framework, an extra function: > > > > $cli->readStdinByteRange (&$output, &$read, $bytes) > > > > It returns true if there is more data, and false if the feof is reached. > > In this way it can be used in a loop liike this one: > > > > while ($cli->readStdinByteRange (&$output, &$read, $bytes)) { > > fwrite($handle, $output); > > } > > > > An patch containing an little enchangement voor the CLI packages is included. > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers