/**
* Gets an array of objects from the results of database query.
*
* @param string $query The query.
* @param integer $limitstart Offset.
* @param integer $limit The number of records.
*
* @return object[] An array of results.
*
* @since 3.0
* @throws \RuntimeException
*/
protected function _getList($query, $limitstart = 0, $limit = 0)
{
if (\is_string($query)) {
$query = $this->getDbo()->getQuery(true)->setQuery($query);
}
$query->setLimit($limit, $limitstart);
$this->getDbo()->setQuery($query);
return $this->getDbo()->loadObjectList();
}