class TemplateVariableContainer extends StandardVariableProvider implements VariableProviderInterface (View source)

Provides the variables inside fluid template. Adds TemplateObjectAccessInterface functionality.

Constants

ACCESSOR_OBJECT_ACCESS

Methods

mixed
getByPath(string $path, array $accessors = [])

Get a variable by dotted path expression, retrieving the variable from nested arrays/objects one segment at a time.

string
resolveSubVariableReferences(string $propertyPath)

No description

null|string
detectAccessor(mixed $subject, string $propertyName)

No description

mixed|null
extractWithAccessor(mixed $subject, string $propertyName, string $accessor)

No description

bool|null
getBooleanValue($path)

Tries to interpret the given path as boolean value, either returns the boolean value or null.

Details

mixed getByPath(string $path, array $accessors = [])

Get a variable by dotted path expression, retrieving the variable from nested arrays/objects one segment at a time.

If the second argument is provided, it must be an array of accessor names which can be used to extract each value in the dotted path.

Parameters

string $path
array $accessors

Return Value

mixed

protected string resolveSubVariableReferences(string $propertyPath)

No description

Parameters

string $propertyPath

Return Value

string

protected null|string detectAccessor(mixed $subject, string $propertyName)

No description

Parameters

mixed $subject
string $propertyName

Return Value

null|string

protected mixed|null extractWithAccessor(mixed $subject, string $propertyName, string $accessor)

No description

Parameters

mixed $subject
string $propertyName
string $accessor

Return Value

mixed|null

protected bool|null getBooleanValue($path)

Tries to interpret the given path as boolean value, either returns the boolean value or null.

Parameters

$path

Return Value

bool|null