|
SPL-StandardPHPLibrary
|
00001 <?php 00002 00030 class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator 00031 { 00034 function hasChildren() 00035 { 00036 return is_array($this->current()); 00037 } 00038 00043 function getChildren() 00044 { 00045 if ($this->current() instanceof self) 00046 { 00047 return $this->current(); 00048 } 00049 if (empty($this->ref)) 00050 { 00051 $this->ref = new ReflectionClass($this); 00052 } 00053 return $this->ref->newInstance($this->current()); 00054 } 00055 00056 private $ref; 00057 } 00058 00059 ?>
1.7.5.1