- Make readable

This commit is contained in:
Marcus Boerger 2006-03-30 21:57:28 +00:00
parent 193ae05edd
commit ea9487249b
2 changed files with 18 additions and 2 deletions

View File

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

View File

@ -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