Neos\Fusion\TypoScriptObjects\Helpers\FusionPathProxy::getIterator PHP Method

getIterator() public method

Iterates through all subelements.
    public function getIterator()
    {
        $evaluatedArray = array();
        foreach ($this->partialTypoScriptTree as $key => $value) {
            if (!is_array($value)) {
                $evaluatedArray[$key] = $value;
            } elseif (isset($value['__objectType'])) {
                $evaluatedArray[$key] = $this->fusionRuntime->evaluate($this->path . '/' . $key);
            } elseif (isset($value['__eelExpression'])) {
                $evaluatedArray[$key] = $this->fusionRuntime->evaluate($this->path . '/' . $key, $this->templateImplementation);
            } else {
                $evaluatedArray[$key] = new FusionPathProxy($this->templateImplementation, $this->path . '/' . $key, $this->partialTypoScriptTree[$key]);
            }
        }
        return new \ArrayIterator($evaluatedArray);
    }