39 private $prefix = array(0=>
'', 1=>
'| ', 2=>
' ', 3=>
'|-', 4=>
'\-', 5=>
'');
62 if (0 > $part || $part > 5) {
65 $this->prefix[$part] = (string)$value;
73 for ($level = 0; $level < $this->
getDepth(); $level++)
75 $tree .= $this->
getSubIterator($level)->hasNext() ? $this->prefix[1] : $this->prefix[2];
77 $tree .= $this->
getSubIterator($level)->hasNext() ? $this->prefix[3] : $this->prefix[4];
79 return $this->prefix[0] . $tree . $this->prefix[5];
86 return @(string)parent::current();
100 if ($this->rit_flags & self::BYPASS_CURRENT)
102 return parent::current();
114 if ($this->rit_flags & self::BYPASS_KEY)
116 return parent::key();
128 return call_user_func_array(array($this->
getSubIterator(), $func), $params);
RecursiveIteratorIterator to generate ASCII graphic trees for the entries in a RecursiveIterator.
const PREFIX_END_HAS_NEXT
Prefix used if $level == depth and hasNext($level) == true.
Iterates through recursive iterators.
const PREFIX_RIGHT
Prefix used right in front of the current element.
const PREFIX_MID_LAST
Prefix used if $level < depth and hasNext($level) == false.
Cached recursive iteration over another Iterator.
Interface for recursive iteration with RecursiveIteratorIterator.
const PREFIX_MID_HAS_NEXT
Prefix used if $level < depth and hasNext($level) == true.
setPrefixPart($part, $value)
Set prefix part as used in getPrefix() and stored in $prefix.
Exception thrown when an illegal index was requested.
const PREFIX_END_LAST
Prefix used if $level == depth and hasNext($level) == false.
getSubIterator($level=NULL)
const PREFIX_LEFT
Prefix used to start elements.
__call($func, $params)
Aggregates the inner iterator.
__construct(RecursiveIterator $it, $rit_flags=self::BYPASS_KEY, $cit_flags=CachingIterator::CATCH_GET_CHILD, $mode=self::SELF_FIRST)