Just a node: The thing you saw required SXE objects implementing interface RecursiveIterator{reset(), hasMore(), key(), current(), next(), hasChildren(), getChildren()}
Excuse my ignorance: As I wasn't at ApacheCon I'm not sure what Adam was talking about, is the SXE/RecursiveIterator stuff what makes foreach possible?
That's exactly why dimity tried to implement $obj->node[0]. And i guess this is vital to the extension.
Again: Is $obj->node[0] needed to provide foreach in all cases (0, 1 or more elements)? Or is this another way of accessing the elements?
To achieve that the property ready handler would have to return an array or iterator class always. That's all that needs to be changed. Unfortunatley this would be a major change of functionality so feel free to drop proeprty handling completley.
Again I can't follow the conclusion your drawing. I think people on the list here expressed what they'd like to see as functionality (i.e. how they'd use SimpleXML). If it needs a major change so be it.
I guess it can be done by simply fixing the refcounting. So why not start some work/analysis instead of mucking around? The least bit you could do is writing some test files under test subdirectory.
I think the problem right now is that noone feels responsible to go and start coding. Old dilemma: If you start coding too early people get upset because you didn't ask first. And if you want to nail down the specs first you get accused of 'only mucking around'.
So who's responsible for SimpleXML now and what are the specs? I'd be willing to provide some code if the person in charge wants help, I don't have the knowledge or karma on this list to lead the development though, that's for sure. So give me specs and I give you e.g. test cases :-)
- Chris
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php