On 11/05/2024 08:38, Marc B. wrote:
> Hi Niels,
> 
> Am 10.05.2024 19:38 schrieb Niels Dossche <dossche.ni...@gmail.com>:
> 
>     On 10/05/2024 16:31, Larry Garfield wrote:
>     > On Fri, May 10, 2024, at 2:03 PM, Niels Dossche wrote:
>     >> On 22/04/2024 20:41, Niels Dossche wrote:
>     >>> Hi internals
>     >>>
>     >>> I'm opening the discussion for my RFC "Add openStream() to 
> XML{Reader,Writer}".
>     >>> RFC link: https://wiki.php.net/rfc/xmlreader_writer_streams
>     >>>
>     >>> Kind regards
>     >>> Niels
>     >>
>     >> Hi internals
>     >>
>     >> It's been over two weeks since I opened the discussion.
>     >> Please raise any last concerns now.
>     >> I'd like to start voting next week Monday.
>     >>
>     >> Kind regards
>     >> Niels
> 

Hi Marc

> Haven't looked at the implementation but it feels weird to call an openStream 
> method on an already opened stream on already instantiated object. What does 
> it open?

I'm guessing this question is about the naming of the method?
The way I saw it is that you open the XMLReader/XMLWriter to the stream, but I 
can see how this could be confusing.
What about the names XMLReader->fromStream and XMLWriter->toStream ?

> 
> And what happens on calling openStream in a middle of reading/writing an XML 
> document.
> What happens on calling openStream stream after calling open - does it 
> read/write from/to both?

What will happen is the same thing that already happens when you call 
$xmlWriter->openUri for example when it was already opened: from then on 
forward it will start writing _only_ to the new uri. So when you call 
$xmlWriter->openStream($newstream) then it will start writing to the $newstream 
from then on forward, not to two streams at the same time.
Similarly, for XMLReader, when you call an open method again it will start 
reading from the last provided source from that point forward.

> 
> Best,
> Marc
> 

Kind regards
Niels

> 
> 
>     Kind regards
>     Niels
> 
> 

Reply via email to