php-src/ext/spl/internal/parentiterator.inc

32 lines
615 B
PHP
Raw Normal View History

2003-11-22 20:52:06 +00:00
<?php
2004-10-29 20:58:58 +00:00
/** @file parentiterator.inc
2004-10-31 19:05:37 +00:00
* @ingroup SPL
2004-10-29 20:58:58 +00:00
* @brief class FilterIterator
* @author Marcus Boerger
2009-05-02 01:52:54 +00:00
* @date 2003 - 2009
2004-10-29 20:58:58 +00:00
*
* SPL - Standard PHP Library
*/
/**
* @brief Iterator to filter parents
* @author Marcus Boerger
* @version 1.2
2005-09-15 03:52:58 +00:00
* @since PHP 5.1
2004-10-29 20:58:58 +00:00
*
* This extended FilterIterator allows a recursive iteration using
* RecursiveIteratorIterator that only shows those elements which have
* children.
*/
class ParentIterator extends RecursiveFilterIterator
2003-11-22 20:52:06 +00:00
{
2004-10-29 20:58:58 +00:00
/** @return whetehr the current element has children
*/
2003-11-22 20:52:06 +00:00
function accept()
{
return $this->it->hasChildren();
}
}
?>