A bug with RecursiveIteratorIterator?
| From: | Chris | Date: | Mon, 08 Aug 2005 18:39:02 +0000 |
| Subject: | A bug with RecursiveIteratorIterator? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-220243@lists.php.net to get a copy of this message | ||
I'm trying to extend the RecursiveIteratorIterator class, to limit which children it recurses through.
The documentation here:
http://www.php.net/~helly/php/ext/spl/classRecursiveIteratorIterator.html
says that there is a ahapublic method callHasChildren(), which I figured was a good place to start. It seemed like it made sense, except for the fact that that callHasChildren() does not exist. Overloading the function does nothing, and instantiating my extended object, then manually calling callHasChildren() results in a method not found error.
Call to undefined method RecursiveIteratorIterator::callhaschildren()
I'm including my complete extension class below
Thanks,
Chris
class CPage_TreeMenuIterator extends RecursiveIteratorIterator
{
function __construct(CPage_Node $it)
{
parent::__construct($it,RIT_SELF_FIRST);
}
function callHasChildren()
{
echo "CPage_TreeMenuIterator::callHasChildren();<br />\n";
return parent::callHasChildren();
}
}