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

offsetGet() public method

Return the object at $offset; evaluating simple types right away, and wrapping arrays into ourselves again.
public offsetGet ( string $offset ) : mixed | FusionPathProxy
$offset string
return mixed | FusionPathProxy
    public function offsetGet($offset)
    {
        if (!isset($this->partialTypoScriptTree[$offset])) {
            return null;
        }
        if (!is_array($this->partialTypoScriptTree[$offset])) {
            // Simple type; we call "evaluate" nevertheless to make sure processors are applied.
            return $this->fusionRuntime->evaluate($this->path . '/' . $offset);
        } else {
            // arbitrary array (could be Eel expression, TypoScript object, nested sub-array) again, so we wrap it with ourselves.
            return new FusionPathProxy($this->templateImplementation, $this->path . '/' . $offset, $this->partialTypoScriptTree[$offset]);
        }
    }