protected function prepareArrayValue(array $value)
    {
        $rii = new \RecursiveIteratorIterator(
            new \RecursiveArrayIterator($value),
            \RecursiveIteratorIterator::SELF_FIRST
        );
        foreach ($rii as $key => $value) {
            if (($value instanceof ValueGenerator) === false) {
                $value = new self($value);
                $rii->getSubIterator()->offsetSet($key, $value);
            }

            $value->setIndentationLevel($value->getIndentationLevel() + $rii->getDepth());
        }

        return $rii->getSubIterator()->getArrayCopy();
    }
protected function prepareArrayValue(array $value)
    {
        $rii = new \RecursiveIteratorIterator(
            new \RecursiveArrayIterator($value),
            \RecursiveIteratorIterator::SELF_FIRST
        );
        foreach ($rii as $key => $value) {
            if (($value instanceof ValueGenerator) === false) {
                $value = new self($value);
                $rii->getSubIterator()->offsetSet($key, $value);
            }

            $value->setIndentationLevel($value->getIndentationLevel() + $rii->getDepth());
        }

        return $rii->getSubIterator()->getArrayCopy();
    }
protected function prepareArrayValue ( array $ value ) { $ rii = new \ RecursiveIteratorIterator ( new \ RecursiveArrayIterator ( $ value ) , \ RecursiveIteratorIterator :: SELF_FIRST ) ; foreach ( $ rii as $ key => $ value ) { if ( ( $ value instanceof ValueGenerator ) === false ) { $ value = new self ( $ value ) ; $ rii -> getSubIterator ( ) -> offsetSet ( $ key , $ value ) ; } $ value -> setIndentationLevel ( $ value -> getIndentationLevel ( ) + $ rii -> getDepth ( ) ) ; } return $ rii -> getSubIterator ( ) -> getArrayCopy ( ) ; }
Prepare the array value.

It will make sure that all the elements of the array can be generated.

@param array $value The value to prepare.
Prepare the array value .