interface TemplateObjectAccessInterface (View source)

This interface should be implemented by proxy objects which want to return something different than themselves when being part of a Fluid ObjectAccess chain such as {foo.bar.baz}.

It consists only of one method "objectAccess()", which is called whenever an object implementing this interface is encountered at a property path. The return value of this method is the basis for further object accesses; so the object effectively "replaces" itself.

Example: If the object at "foo.bar" implements this interface, the "objectAccess()" method is called after evaluating foo.bar; and the returned value is then traversed to "baz".

Often it can make sense to implement this interface alongside with the ArrayAccess interface.

It is currently used internally and might change without further notice.

Methods

mixed
objectAccess()

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

Details

mixed objectAccess()

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

Return Value

mixed

the value which should be returned to the caller, or which should be traversed further.