ColumnInterface
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
Get column name
Get column data
Get column data at given index
Get column data at given index, parsed as a date/time value.
Details
string
getKey()
Get column name
array
getData()
Get column data
mixed
getDataByIndex(int $recordIndex)
Get column data at given index
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()}.