class FusionPathProxy implements TemplateObjectAccessInterface, ArrayAccess, IteratorAggregate, Countable (View source)

A proxy object representing a Fusion path inside a Fluid Template. It allows to render arbitrary Fusion objects or Eel expressions using the already-known property path syntax.

It wraps a part of the Fusion tree which does not contain Fusion objects or Eel expressions.

This class is instantiated inside TemplateImplementation and is never used outside.

Properties

protected Runtime $fusionRuntime

Reference to the Fusion Runtime which controls the whole rendering

protected TemplateImplementation $templateImplementation

Reference to the "parent" Fusion object

protected string $path

The Fusion path this object proxies

protected array $partialFusionTree

This is a part of the Fusion tree built when evaluating $this->path.

Methods

__construct(TemplateImplementation $templateImplementation, string $path, array $partialFusionTree)

Constructor.

bool
offsetExists(string $offset)

true if a given subpath exists, false otherwise.

offsetGet(string $offset)

Return the object at $offset; evaluating simple types right away, and wrapping arrays into ourselves again.

offsetSet(string $offset, mixed $value)

Stub to implement the ArrayAccess interface cleanly

offsetUnset(string $offset)

Stub to implement the ArrayAccess interface cleanly

objectAccess()

Post-Processor which is called whenever this object is encountered in a Fluid object access.

getIterator()

Iterates through all subelements.

int
count()

No description

Details

__construct(TemplateImplementation $templateImplementation, string $path, array $partialFusionTree)

Constructor.

Parameters

TemplateImplementation $templateImplementation
string $path
array $partialFusionTree

bool offsetExists(string $offset)

true if a given subpath exists, false otherwise.

Parameters

string $offset

Return Value

bool

mixed|FusionPathProxy offsetGet(string $offset)

Return the object at $offset; evaluating simple types right away, and wrapping arrays into ourselves again.

Parameters

string $offset

Return Value

mixed|FusionPathProxy

offsetSet(string $offset, mixed $value)

Stub to implement the ArrayAccess interface cleanly

Parameters

string $offset
mixed $value

Exceptions

UnsupportedProxyMethodException

offsetUnset(string $offset)

Stub to implement the ArrayAccess interface cleanly

Parameters

string $offset

Exceptions

UnsupportedProxyMethodException

FusionPathProxy|mixed objectAccess()

Post-Processor which is called whenever this object is encountered in a Fluid object access.

Evaluates Fusion objects and eel expressions.

Return Value

FusionPathProxy|mixed

Exceptions

Exception

ArrayIterator getIterator()

Iterates through all subelements.

Return Value

ArrayIterator

int count()

No description

Return Value

int