- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 112
Closed
Labels
Description
Description of the problem
Output is done to a stream, STDOUT by default, but can be set to an arbitrary stream.
Sometimes this is not flexible enough. For example, I want to write to 2 streams simultaneously. There may also be situations where a stream is not supported by a particular output method.
This could be solved by a custom stream wrapper or filter, but a callback for output would be much simpler. Would it be possible to support that?
Example code
// Example for new callback option. Overrides default stream output.
$options = new ZipStream\Option\Archive();
$options->setOutputCallback(function ($data) {
write_output($data);
});Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
Select code repository
Activity
maennchen commentedon Feb 24, 2022
I would welcome an addition, that would support this the following way:
PRs are welcome for this.
Add CallbackStreamWrapper for custom ZIP output (maennchen#199)
Add CallbackStreamWrapper for custom ZIP output (#363)