Annotation of embedaddon/php/ext/spl/examples/directorygraphiterator.inc, revision 1.1

1.1     ! misho       1: <?php
        !             2: 
        !             3: /** @file directorygraphiterator.inc
        !             4:  * @ingroup Examples
        !             5:  * @brief class DirectoryGraphIterator
        !             6:  * @author  Marcus Boerger
        !             7:  * @date    2003 - 2005
        !             8:  *
        !             9:  * SPL - Standard PHP Library
        !            10:  */
        !            11: 
        !            12: /** @ingroup Examples
        !            13:  * @brief   A tree iterator that only shows directories.
        !            14:  * @author  Marcus Boerger
        !            15:  * @version 1.1
        !            16:  */
        !            17: class DirectoryGraphIterator extends DirectoryTreeIterator
        !            18: {
        !            19:        function __construct($path)
        !            20:        {
        !            21:                RecursiveIteratorIterator::__construct(
        !            22:                        new RecursiveCachingIterator(
        !            23:                                new ParentIterator(
        !            24:                                        new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_FILENAME
        !            25:                                        )
        !            26:                                ), 
        !            27:                                CachingIterator::CALL_TOSTRING|CachingIterator::CATCH_GET_CHILD
        !            28:                        ), 
        !            29:                        parent::SELF_FIRST
        !            30:                );
        !            31:        }
        !            32: }
        !            33: 
        !            34: ?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>