Documentation

DataAccessorInterface

Writes and reads values to/from an object or array bound to a form.

Tags
author

Yonel Ceruto yonelceruto@gmail.com

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
throws
AccessException

If unable to read from the given form data

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
bool

isWritable()

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
bool

setValue()

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
Tags
throws
AccessException

If unable to write the given value


        
On this page

Search results