Re: Pass file handle in XMLReader

From: Date: Fri, 04 Dec 2020 12:48:21 +0000
Subject: Re: Pass file handle in XMLReader
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-112414@lists.php.net to get a copy of this message
On 04.12.2020 at 13:35, Aimeos | Norbert Sendetzky wrote: > Am 04.12.20 um 13:23 schrieb Christoph M. Becker: > >> For clarity, it might be preferable to introduce a new static creation >> method for this. The implementation could probably use >> xmlReaderForIO()[1], instead of xmlReaderForFile(). > > Wouldn't xmlReaderForFd() be more suitable or is this only for file > handles, not for streams? xmlReaderForFd() is only for file descriptors; PHP streams are more general. > What would be a good name for the new method? XMLReader::stream()? Maybe XMLReader::createForStream(), but I think the name is secondary; someone would have to come up at least with a draft implementation first. Regards, Christoph

« previous php.internals (#112414) next »