interface ColumnInterface (View source)

Common Column Interface

Declares what a column can be asked, not how it is built. Do not re-add a __construct() declaration: nothing constructs through this type (columns come from a brand's addColumn(), which names its concrete class), and PHP does enforce a constructor declared on an interface — unlike one inherited from a parent class — so the declaration constrained every implementer without giving a caller anything. Guarded by tests/RecordColumnSeamTest.php; rationale in docs/agents/architecture.md.

Methods

string
getKey()

Get column name

array
getData()

Get column data

mixed
getDataByIndex(int $recordIndex)

Get column data at given index

getDateTimeByIndex(int $recordIndex)

Get column data at given index, parsed as a date/time value.

Details

string getKey()

Get column name

Return Value

string

array getData()

Get column data

Return Value

array

mixed getDataByIndex(int $recordIndex)

Get column data at given index

Parameters

int $recordIndex

Return Value

mixed

ApiDateTime|null getDateTimeByIndex(int $recordIndex)

Get column data at given index, parsed as a date/time value.

Returns null for an out-of-range index, a non-string value, or a string that cannot be parsed — see {\CNIC\ApiDateTime::tryFrom()}.

Parameters

int $recordIndex

Return Value

ApiDateTime|null