Documentation

GetSetValueTrait

Trait for actions with a `$values` array

Table of Contents

Methods

addValue()  : $this
Add an item to the values array.
getValue()  : mixed|null
Retrieve a single value, transforming pseudoconstants as necessary
getValues()  : array<string|int, mixed>
setValues()  : $this
Overwrite all values

Methods

addValue()

Add an item to the values array.

public addValue(string $fieldName, mixed $value) : $this
Parameters
$fieldName : string
$value : mixed
Return values
$this

getValue()

Retrieve a single value, transforming pseudoconstants as necessary

public getValue(string $fieldExpr) : mixed|null
Parameters
$fieldExpr : string
Return values
mixed|null

getValues()

public getValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

setValues()

Overwrite all values

public setValues(array<string|int, mixed> $values) : $this
Parameters
$values : array<string|int, mixed>
Return values
$this

        
On this page

Search results