SPL-StandardPHPLibrary
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
internal
recursivearrayiterator.inc
Go to the documentation of this file.
1
<?php
2
30
class
RecursiveArrayIterator
extends
ArrayIterator
implements
RecursiveIterator
31
{
34
function
hasChildren
()
35
{
36
return
is_array($this->
current
());
37
}
38
43
function
getChildren
()
44
{
45
if
($this->
current
() instanceof
self
)
46
{
47
return
$this->
current
();
48
}
49
if
(empty($this->ref))
50
{
51
$this->ref =
new
ReflectionClass($this);
52
}
53
return
$this->ref->newInstance($this->
current
());
54
}
55
56
private
$ref
;
57
}
58
59
?>
RecursiveIterator
Interface for recursive iteration with RecursiveIteratorIterator.
Definition:
recursiveiterator.inc:18
RecursiveArrayIterator\$ref
$ref
Definition:
recursivearrayiterator.inc:56
RecursiveArrayIterator
A recursive array iterator.
Definition:
recursivearrayiterator.inc:30
RecursiveArrayIterator\getChildren
getChildren()
Definition:
recursivearrayiterator.inc:43
RecursiveArrayIterator\hasChildren
hasChildren()
Definition:
recursivearrayiterator.inc:34
ArrayIterator
An Array iterator.
Definition:
spl.php:741
ArrayIterator\current
current()
Return the current element.
Definition:
spl.php:843
Generated on Wed Dec 4 2013 21:25:51 for SPL-StandardPHPLibrary by
1.8.5