Location: PHPKode > scripts > Dynamic Elements Processor with PHP 5 > dynamic-elements-processor-with-php-5/classes/ElementIterator.class.php
<?php

class ElementIterator extends RecursiveIteratorIterator
{
    	public function beginChildren() {
    		if($this->getDepth() >= 3) {
    			echo str_repeat("\n", $this->getDepth() -1);
    			echo " " . PHP_EOL;
    		}
    	}

    	public function endChildren() {
    		if($this->getDepth() >= 3) {
       		echo str_repeat("\n", $this->getDepth() -1);
    			echo " " . PHP_EOL;
    	}
	}
}

?>
Return current item: Dynamic Elements Processor with PHP 5