|
SPL-StandardPHPLibrary
|


Public Member Functions | |
| append ($value) | |
| asort () | |
| count () | |
| current () | |
| getArrayCopy () | |
| getChildren () | |
| getFlags () | |
| hasChildren () | |
| key () | |
| ksort () | |
| natcasesort () | |
| natsort () | |
| next () | |
| offsetExists ($index) | |
| offsetGet ($index) | |
| offsetSet ($index, $newval) | |
| offsetUnset ($index) | |
| rewind () | |
| seek ($position) | |
| setFlags ($flags) | |
| uasort (mixed cmp_function) | |
| uksort (mixed cmp_function) | |
| valid () | |
Public Attributes | |
| const | ARRAY_AS_PROPS = 0x00000002 |
| const | STD_PROP_LIST = 0x00000001 |
Private Attributes | |
| $ref | |
A recursive array iterator.
Passes the RecursiveIterator interface to the inner Iterator and provides the same functionality as FilterIterator. This allows you to skip parents and all their childs before loading them all. You need to care about function getChildren() because it may not always suit your needs. The builtin behavior uses reflection to return a new instance of the exact same class it is called from. That is you extend RecursiveFilterIterator and getChildren() will create instance of that class. The problem is that doing this does not transport any state or control information of your accept() implementation to the new instance. To overcome this problem you might need to overwrite getChildren(), call this implementation and pass the control vaules manually.
Definition at line 30 of file recursivearrayiterator.inc.
| ArrayIterator::append | ( | $ | value | ) | [inherited] |
| $value | is appended as last element |
Definition at line 818 of file spl.php.
{}
| ArrayIterator::asort | ( | ) | [inherited] |
| ArrayIterator::count | ( | ) | [inherited] |
| ArrayIterator::current | ( | ) | [inherited] |
Return the current element.
Implements Iterator.
Reimplemented in SubClasses.
Definition at line 843 of file spl.php.
Referenced by getChildren(), and hasChildren().
{}
| ArrayIterator::getArrayCopy | ( | ) | [inherited] |
Definition at line 824 of file spl.php.
{}
| RecursiveArrayIterator::getChildren | ( | ) |
Implements RecursiveIterator.
Definition at line 43 of file recursivearrayiterator.inc.
References ArrayIterator\current().
{
if ($this->current() instanceof self)
{
return $this->current();
}
if (empty($this->ref))
{
$this->ref = new ReflectionClass($this);
}
return $this->ref->newInstance($this->current());
}

| ArrayIterator::getFlags | ( | ) | [inherited] |
| RecursiveArrayIterator::hasChildren | ( | ) |
Implements RecursiveIterator.
Definition at line 34 of file recursivearrayiterator.inc.
References ArrayIterator\current().
{
return is_array($this->current());
}

| ArrayIterator::key | ( | ) | [inherited] |
Return the key of the current element.
Implements Iterator.
Definition at line 846 of file spl.php.
Referenced by SubClasses\current().
{}
| ArrayIterator::ksort | ( | ) | [inherited] |
| ArrayIterator::natcasesort | ( | ) | [inherited] |
Sort the entries by values using case insensitive "natural order" algorithm.
Definition at line 793 of file spl.php.
Referenced by SubClasses\current().
{}
| ArrayIterator::natsort | ( | ) | [inherited] |
| ArrayIterator::next | ( | ) | [inherited] |
| ArrayIterator::offsetExists | ( | $ | index | ) | [inherited] |
| $index | offset to inspect |
Implements ArrayAccess.
Definition at line 798 of file spl.php.
{}
| ArrayIterator::offsetGet | ( | $ | index | ) | [inherited] |
| $index | offset to return value for |
Implements ArrayAccess.
Definition at line 803 of file spl.php.
{}
| ArrayIterator::offsetSet | ( | $ | index, |
| $ | newval | ||
| ) | [inherited] |
| $index | index to set |
| $newval | new value to store at offset $index |
Implements ArrayAccess.
Definition at line 808 of file spl.php.
Referenced by SubClasses\__construct().
{}
| ArrayIterator::offsetUnset | ( | $ | index | ) | [inherited] |
| $index | offset to unset |
Implements ArrayAccess.
Definition at line 812 of file spl.php.
{}
| ArrayIterator::rewind | ( | ) | [inherited] |
| ArrayIterator::seek | ( | $ | position | ) | [inherited] |
| $position | offset to seek to |
| OutOfBoundsException | if $position is invalid |
Implements SeekableIterator.
Definition at line 829 of file spl.php.
{}
| ArrayIterator::setFlags | ( | $ | flags | ) | [inherited] |
| ArrayIterator::uasort | ( | mixed | cmp_function | ) | [inherited] |
| ArrayIterator::uksort | ( | mixed | cmp_function | ) | [inherited] |
Sort the entries by key using user defined function.
Definition at line 785 of file spl.php.
Referenced by SubClasses\__construct().
{}
| ArrayIterator::valid | ( | ) | [inherited] |
RecursiveArrayIterator::$ref [private] |
Definition at line 56 of file recursivearrayiterator.inc.
const ArrayIterator::ARRAY_AS_PROPS = 0x00000002 [inherited] |
const ArrayIterator::STD_PROP_LIST = 0x00000001 [inherited] |
1.7.5.1