1: <?php
 2: 
 3:  4:  5: 
 6: class Quform_Element_Container_Iterator extends RecursiveArrayIterator implements RecursiveIterator
 7: {
 8:     public function __construct(Quform_Element_Container $container)
 9:     {
10:         parent::__construct($container->getElements());
11:     }
12: 
13:     
14:     public function hasChildren()
15:     {
16:         return $this->current() instanceof Quform_Element_Container;
17:     }
18: 
19:     
20:     public function getChildren()
21:     {
22:         return new Quform_Element_Container_Iterator($this->current());
23:     }
24: }
25: