|
SPL-StandardPHPLibrary
|


Public Member Functions | |
| __call ($func, $params) | |
| __construct (RecursiveIterator $it, $rit_flags=self::BYPASS_KEY, $cit_flags=CachingIterator::CATCH_GET_CHILD, $mode=self::SELF_FIRST) | |
| beginChildren () | |
| callGetChildren () | |
| callHasChildren () | |
| current () | |
| endChildren () | |
| getDepth () | |
| getEntry () | |
| getInnerIterator () | |
| getPostfix () | |
| getPrefix () | |
| getSubIterator ($level=NULL) | |
| key () | |
| next () | |
| nextElement () | |
| rewind () | |
| setPrefixPart ($part, $value) | |
| valid () | |
Public Attributes | |
| const | BYPASS_CURRENT = 0x00000004 |
| const | BYPASS_KEY = 0x00000008 |
| const | CATCH_GET_CHILD = 0x00000002 |
| const | CHILD_FIRST = 2 |
| const | LEAVES_ONLY = 0 |
| const | PREFIX_END_HAS_NEXT = 3 |
| const | PREFIX_END_LAST = 4 |
| const | PREFIX_LEFT = 0 |
| const | PREFIX_MID_HAS_NEXT = 1 |
| const | PREFIX_MID_LAST = 2 |
| const | PREFIX_RIGHT = 5 |
| const | SELF_FIRST = 1 |
Private Attributes | |
| $prefix = array(0=>'', 1=>'| ', 2=>' ', 3=>'|-', 4=>'\-', 5=>'') | |
| $rit_flags | |
RecursiveIteratorIterator to generate ASCII graphic trees for the entries in a RecursiveIterator.
Definition at line 20 of file recursivetreeiterator.inc.
| RecursiveTreeIterator::__construct | ( | RecursiveIterator | $it, |
$rit_flags = self::BYPASS_KEY, |
|||
$cit_flags = CachingIterator::CATCH_GET_CHILD, |
|||
$mode = self::SELF_FIRST |
|||
| ) |
| it | iterator to use as inner iterator |
| rit_flags | flags passed to RecursiveIteratoIterator (parent) |
| cit_flags | flags passed to RecursiveCachingIterator (for hasNext) |
| mode | mode passed to RecursiveIteratoIterator (parent) |
Definition at line 33 of file recursivetreeiterator.inc.
References RecursiveIteratorIterator\$mode, and $rit_flags.
| RecursiveTreeIterator::__call | ( | $func, | |
| $params | |||
| ) |
Aggregates the inner iterator.
Definition at line 126 of file recursivetreeiterator.inc.
References RecursiveIteratorIterator\getSubIterator().

|
inherited |
Called right after calling getChildren() and its rewind().
Definition at line 201 of file recursiveiteratoriterator.inc.
Referenced by RecursiveIteratorIterator\next().
|
inherited |
Definition at line 193 of file recursiveiteratoriterator.inc.
References RecursiveIteratorIterator\$count.
Referenced by RecursiveIteratorIterator\next().
|
inherited |
Definition at line 185 of file recursiveiteratoriterator.inc.
References RecursiveIteratorIterator\$count.
Referenced by RecursiveIteratorIterator\callNextElement(), and RecursiveIteratorIterator\next().
| RecursiveTreeIterator::current | ( | ) |
Implements Iterator.
Definition at line 98 of file recursivetreeiterator.inc.
References getEntry(), getPostfix(), and getPrefix().

|
inherited |
Called after current child iterator is invalid and right before it gets destructed.
Definition at line 209 of file recursiveiteratoriterator.inc.
Referenced by RecursiveIteratorIterator\next(), RecursiveIteratorIterator\rewind(), and RecursiveIteratorIterator\valid().
|
inherited |
Definition at line 177 of file recursiveiteratoriterator.inc.
Referenced by DirectoryTreeIterator\current(), and getPrefix().
| RecursiveTreeIterator::getEntry | ( | ) |
Definition at line 84 of file recursivetreeiterator.inc.
Referenced by current().
|
inherited |
Implements OuterIterator.
Definition at line 170 of file recursiveiteratoriterator.inc.
References $it.
Referenced by RecursiveCompareDualIterator\areEqual(), RecursiveCompareDualIterator\areIdentical(), and RecursiveCompareDualIterator\endChildren().
| RecursiveTreeIterator::getPostfix | ( | ) |
Definition at line 91 of file recursivetreeiterator.inc.
| RecursiveTreeIterator::getPrefix | ( | ) |
Definition at line 70 of file recursivetreeiterator.inc.
References RecursiveIteratorIterator\getDepth(), and RecursiveIteratorIterator\getSubIterator().
Referenced by current(), and key().

|
inherited |
Definition at line 159 of file recursiveiteratoriterator.inc.
References RecursiveIteratorIterator\$count.
Referenced by DirectoryTreeIterator\__call(), __call(), DirectoryTreeIterator\current(), and getPrefix().
| RecursiveTreeIterator::key | ( | ) |
Implements Iterator.
Definition at line 112 of file recursivetreeiterator.inc.
References getPostfix(), and getPrefix().

|
inherited |
Forward to next element.
Implements Iterator.
Definition at line 107 of file recursiveiteratoriterator.inc.
References RecursiveIteratorIterator\$count, $it, RecursiveIteratorIterator\beginChildren(), RecursiveIteratorIterator\callGetChildren(), RecursiveIteratorIterator\callHasChildren(), RecursiveIteratorIterator\callNextElement(), and RecursiveIteratorIterator\endChildren().

|
inherited |
Called when the next element is available.
Definition at line 232 of file recursiveiteratoriterator.inc.
Referenced by RecursiveIteratorIterator\callNextElement().
|
inherited |
Rewind to top iterator as set in constructor.
Implements Iterator.
Definition at line 62 of file recursiveiteratoriterator.inc.
References RecursiveIteratorIterator\callNextElement(), and RecursiveIteratorIterator\endChildren().

| RecursiveTreeIterator::setPrefixPart | ( | $part, | |
| $value | |||
| ) |
Set prefix part as used in getPrefix() and stored in $prefix.
| $part | any PREFIX_* const. |
| $value | new prefix string for specified part. |
| OutOfRangeException | if 0 > $part or $part > 5. |
Definition at line 60 of file recursivetreeiterator.inc.
|
inherited |
Implements Iterator.
Definition at line 75 of file recursiveiteratoriterator.inc.
References RecursiveIteratorIterator\$count, $it, and RecursiveIteratorIterator\endChildren().
Referenced by RecursiveIteratorIterator\callNextElement().

|
private |
Definition at line 39 of file recursivetreeiterator.inc.
|
private |
Definition at line 25 of file recursivetreeiterator.inc.
Referenced by __construct().
| const RecursiveTreeIterator::BYPASS_CURRENT = 0x00000004 |
Definition at line 22 of file recursivetreeiterator.inc.
| const RecursiveTreeIterator::BYPASS_KEY = 0x00000008 |
Definition at line 23 of file recursivetreeiterator.inc.
|
inherited |
Flag: Catches exceptions during getChildren() calls and simply jumps to the next element.
Definition at line 33 of file recursiveiteratoriterator.inc.
|
inherited |
Mode: Show all children prior to their parent.
Definition at line 29 of file recursiveiteratoriterator.inc.
|
inherited |
Mode: Only show leaves.
Definition at line 25 of file recursiveiteratoriterator.inc.
| const RecursiveTreeIterator::PREFIX_END_HAS_NEXT = 3 |
Prefix used if $level == depth and hasNext($level) == true.
Definition at line 48 of file recursivetreeiterator.inc.
| const RecursiveTreeIterator::PREFIX_END_LAST = 4 |
Prefix used if $level == depth and hasNext($level) == false.
Definition at line 50 of file recursivetreeiterator.inc.
| const RecursiveTreeIterator::PREFIX_LEFT = 0 |
Prefix used to start elements.
Definition at line 42 of file recursivetreeiterator.inc.
| const RecursiveTreeIterator::PREFIX_MID_HAS_NEXT = 1 |
Prefix used if $level < depth and hasNext($level) == true.
Definition at line 44 of file recursivetreeiterator.inc.
| const RecursiveTreeIterator::PREFIX_MID_LAST = 2 |
Prefix used if $level < depth and hasNext($level) == false.
Definition at line 46 of file recursivetreeiterator.inc.
| const RecursiveTreeIterator::PREFIX_RIGHT = 5 |
Prefix used right in front of the current element.
Definition at line 52 of file recursivetreeiterator.inc.
|
inherited |
Mode: Show parents prior to their children.
Definition at line 27 of file recursiveiteratoriterator.inc.
1.8.5