php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #63506 Adding openStream() method to XMLWriter
Submitted: 2012-11-13 18:26 UTC Modified: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: evert at rooftopsolutions dot nl Assigned:
Status: Open Package: XML Writer
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: evert at rooftopsolutions dot nl
New email:
PHP Version: OS:

 

 [2012-11-13 18:26 UTC] evert at rooftopsolutions dot nl
Description:
------------
It would be extremely handy if, instead of supplying XMLWriter with a uri, we can give it a writeable stream instead, as such;

$h  = fopen('php://output','w');
$xw = new \XMLWriter();
$xw->openStream($h);

This way the XMLWriter does not have to be aware of an output uri.

In my applications (webservices) I simply work with out an output, and an input stream. Different components write to the outputstream, and what they are writing comes from different sources.

Unittests often simply replace the outputstream with php://memory, or php://temp, so the application output can get easily redirected.

Using openUri() I have to break this, which would kind of suck.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Aug 15 12:01:25 2020 UTC