DataAccessorInterface
in
Writes and reads values to/from an object or array bound to a form.
Tags
Table of Contents
Methods
- getValue() : mixed
- Returns the value at the end of the property of the object graph.
- isReadable() : bool
- Returns whether a value can be read from an object graph.
- isWritable() : bool
- Returns whether a value can be written at a given object graph.
- setValue() : void
- Sets the value at the end of the property of the object graph.
Methods
getValue()
Returns the value at the end of the property of the object graph.
public
getValue(object|array<string|int, mixed> $viewData, FormInterface $form) : mixed
Parameters
- $viewData : object|array<string|int, mixed>
- $form : FormInterface
Tags
isReadable()
Returns whether a value can be read from an object graph.
public
isReadable(object|array<string|int, mixed> $viewData, FormInterface $form) : bool
Whenever this method returns true, is guaranteed not to throw an exception when called with the same arguments.
Parameters
- $viewData : object|array<string|int, mixed>
- $form : FormInterface
Return values
boolisWritable()
Returns whether a value can be written at a given object graph.
public
isWritable(object|array<string|int, mixed> $viewData, FormInterface $form) : bool
Whenever this method returns true, is guaranteed not to throw an exception when called with the same arguments.
Parameters
- $viewData : object|array<string|int, mixed>
- $form : FormInterface
Return values
boolsetValue()
Sets the value at the end of the property of the object graph.
public
setValue(object|array<string|int, mixed> &$viewData, mixed $value, FormInterface $form) : void
Parameters
- $viewData : object|array<string|int, mixed>
- $value : mixed
- $form : FormInterface