*/
class ParentIterator extends RecursiveFilterIterator
{
- /** @param $it the RecursiveIterator to filter
- */
- function __construct(RecursiveIterator $it)
- {
- parent::__construct($it);
- }
-
/** @return whetehr the current element has children
*/
function accept()
{
return $this->it->hasChildren();
}
-
- /** @return the ParentIterator for the current elements children
- */
- function getChildren()
- {
- return new ParentIterator($this->it->getChildren());
- }
}
?>
\ No newline at end of file
static zend_function_entry spl_funcs_RecursiveFilterIterator[] = {
SPL_ME(RecursiveFilterIterator, __construct, arginfo_parent_it___construct, ZEND_ACC_PUBLIC)
- SPL_MA(ParentIterator, accept, RecursiveFilterIterator, hasChildren, NULL, ZEND_ACC_PUBLIC)
SPL_ME(RecursiveFilterIterator, hasChildren, NULL, ZEND_ACC_PUBLIC)
SPL_ME(RecursiveFilterIterator, getChildren, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}