From:             evert at rooftopsolutions dot nl
Operating system: 
PHP version:      Irrelevant
Package:          XML Writer
Bug Type:         Feature/Change Request
Bug description:Adding openStream() method to XMLWriter

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.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=63506&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63506&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63506&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=63506&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63506&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63506&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63506&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63506&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63506&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63506&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63506&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=63506&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=63506&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63506&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63506&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63506&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63506&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63506&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63506&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63506&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63506&r=mysqlcfg

Reply via email to