From: Marcus Boerger Date: Thu, 30 Mar 2006 22:03:02 +0000 (+0000) Subject: - MFB Make readable X-Git-Tag: RELEASE_1_3~184 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7244fc2c0d1974cea2a1f10892fbdfc5befd000;p=php - MFB Make readable --- diff --git a/ext/spl/examples/directorygraphiterator.inc b/ext/spl/examples/directorygraphiterator.inc index 097aed0e9f..5808e3b89e 100644 --- a/ext/spl/examples/directorygraphiterator.inc +++ b/ext/spl/examples/directorygraphiterator.inc @@ -4,7 +4,7 @@ * @ingroup Examples * @brief class DirectoryGraphIterator * @author Marcus Boerger - * @date 2003 - 2006 + * @date 2003 - 2005 * * SPL - Standard PHP Library */ @@ -18,7 +18,16 @@ class DirectoryGraphIterator extends DirectoryTreeIterator { function __construct($path) { - RecursiveIteratorIterator::__construct(new RecursiveCachingIterator(new ParentIterator(new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_FILENAME)), CachingIterator::CALL_TOSTRING|CachingIterator::CATCH_GET_CHILD), 1); + RecursiveIteratorIterator::__construct( + new RecursiveCachingIterator( + new ParentIterator( + new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_FILENAME + ) + ), + CachingIterator::CALL_TOSTRING|CachingIterator::CATCH_GET_CHILD + ), + parent::SELF_FIRST + ); } } diff --git a/ext/spl/examples/directorytreeiterator.inc b/ext/spl/examples/directorytreeiterator.inc index aab8843325..8e65d0db12 100644 --- a/ext/spl/examples/directorytreeiterator.inc +++ b/ext/spl/examples/directorytreeiterator.inc @@ -4,7 +4,7 @@ * @ingroup Examples * @brief class DirectoryTreeIterator * @author Marcus Boerger - * @date 2003 - 2006 + * @date 2003 - 2005 * * SPL - Standard PHP Library */ @@ -21,7 +21,14 @@ class DirectoryTreeIterator extends RecursiveIteratorIterator */ function __construct($path) { - parent::__construct(new RecursiveCachingIterator(new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_FILENAME), CachingIterator::CALL_TOSTRING|CachingIterator::CATCH_GET_CHILD), 1); + parent::__construct( + new RecursiveCachingIterator( + new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::KEY_AS_FILENAME + ), + CachingIterator::CALL_TOSTRING|CachingIterator::CATCH_GET_CHILD + ), + parent::SELF_FIRST + ); } /** @return the current element prefixed with ASCII graphics