oai = $oai; } // // Records // /** * Return set of OAI records matching specified parameters. * * @param array $setIds Objects ids that specify an OAI set, in this case only journal ID. * @param int $from timestamp * @param int $until timestamp * @param int $offset * @param int $limit * @param int $total * @param string $funcName * * @return array OAIRecord */ public function &getDRIVERRecordsOrIdentifiers($setIds, $from, $until, $offset, $limit, &$total, $funcName) { $records = []; $result = new \ArrayIterator($this->_getRecordsRecordSetQuery($setIds, $from, $until, null)->get()); $total = 0; for ($i = 0; $i < $offset; $i++) { if ($result->next()) { $total++; } // FIXME: This is inefficient } for ($count = 0; $count < $limit && $result->current(); $count++ && $total++) { $row = (array) $result->current(); $record = $this->_returnRecordFromRow($row); if (in_array('driver', $record->sets)) { $records[] = $record; } $result->next(); } return $records; } }