DataSource
class DataSource
The server-side data source for the Table widget.
Properties
protected string | $keyColumn | ||
protected int | $offset | ||
protected array | $data |
Methods
Class constructor.
Initializes records in the data source.
Returns a total number of records in the data source.
Removes all records from the data source.
Return records from the data source.
Returns all records in the data source.
Rewinds the the data source to the first record.
Returns a set of records from the data source.
Details
at line 30
construct(string $keyColumn = 'id')
Class constructor.
at line 43
initRecords(array $records)
Initializes records in the data source.
The method doesn't replace existing records and could be called multiple times in order to fill the data source.
at line 52
int
getCount()
Returns a total number of records in the data source.
at line 60
purge()
Removes all records from the data source.
at line 74
array
getRecords(int $offset, int $count)
Return records from the data source.
at line 83
getAllRecords()
Returns all records in the data source.
This method is specific only for the client memory data sources.
at line 92
reset()
Rewinds the the data source to the first record.
Use this method with the readRecords() method.
at line 105
array
readRecords(int $count = 10)
Returns a set of records from the data source.