data = array_merge($this->data, $records); } /** * Returns a total number of records in the data source. * @return integer */ public function getCount() { return count($this->data); } /** * Removes all records from the data source. */ public function purge() { $this->data = []; } /** * Return records from the data source. * @param integer $offset Specifies the offset of the first record to return, zero-based. * @param integer $count Specifies the number of records to return. * @return array Returns the records. * If there are no more records, returns an empty array. */ public function getRecords($offset, $count) { return array_slice($this->data, $offset, $count); } /** * Returns all records in the data source. * This method is specific only for the client memory data sources. */ public function getAllRecords() { return $this->data; } }