interface RecordInterface (View source)

Common Record Interface

Declares what a record can be asked, not how it is built. Do not re-add a __construct() declaration, for the same reason as {\CNIC\ColumnInterface}: records come from each Response's newRecord() hook, which names its concrete class, so the declaration only limited implementers to a plain array-backed row. Guarded by tests/RecordColumnSeamTest.php.

Methods

array
getData()

Get row data

mixed
getDataByKey(string $columnName)

Get row data for given column, or null if the column does not exist

getDateTimeByKey(string $columnName)

Get row data for given column, parsed as a date/time value.

Details

array getData()

Get row data

Return Value

array

row data

mixed getDataByKey(string $columnName)

Get row data for given column, or null if the column does not exist

Parameters

string $columnName

Return Value

mixed

ApiDateTime|null getDateTimeByKey(string $columnName)

Get row data for given column, parsed as a date/time value.

Returns null for a missing key, a non-string value, or a string that cannot be parsed — see {\CNIC\ApiDateTime::tryFrom()}.

Parameters

string $columnName

Return Value

ApiDateTime|null