You are here: A bug with RecursiveIteratorIterator? « PHP « IT news, forums, messages
A bug with RecursiveIteratorIterator?

Posted by Chris on 10/04/42 11:23

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();
}
}

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация