Re: [PATCH] RecursiveTreeIterator implementation
| From: | Arnaud Le Blanc | Date: | Thu, 10 Jul 2008 12:16:33 +0000 |
| Subject: | Re: [PATCH] RecursiveTreeIterator implementation | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-38897@lists.php.net to get a copy of this message | ||
Hello,
On Wednesday 09 July 2008 20:06:14 Marcus Boerger wrote:
> Hello Arnaud,
>
> if you can provicde the same for HEAD then I'll submit it. And if you're
> fast enough we might even get it into 5.3.0 :-) Johannes, Lukas, how
> much time does he have?
>
> marcus
Ok, I made it [1]. I never walked through the PHP6 code until now, I hope this
is correct.
getPrefix and getPostfix return a binary or unicode string depending on
UG(unicode).
getEntry returns the original value if it is binary or unicode. Else it
converts it depending on UG(unicode), as the purpose of this method is to
cast to string.
The convertion from array to string in getPrefix throws E_NOTICE errors, so I
had to change the error_reporting setting in my test cases [2] for them to
pass. I don't know if I may remove these errors or not.
current returns the type returned by getEntry.
key acts like getEntry.
I added a test (005) for the returned types. And an other (006) to test the
case where RecursiveTreeIterator got an IteratorAggregate as first param. All
tests should pass on 5.3 except 005.
[1] http://arnaud.lb.s3.amazonaws.com/RecursiveTreeIterator_HEAD.patch
[2] http://arnaud.lb.s3.amazonaws.com/RecursiveTreeIterator-phpt.tar.bz2
Arnaud