/** * Returns an array of whatever objects extends this class (e.g. PageList returns a list of pages). */ public function get($itemsToGet = 0, $offset = 0) { $q = $this->executeBase(); // handle order by $this->setupAttributeSort(); $this->setupAutoSort(); $this->setupSortByString(); if ($this->sortByString != '') { $q .= 'order by ' . $this->sortByString . ' '; } if ($this->itemsPerPage > 0 && (intval($itemsToGet) || intval($offset))) { $q .= 'limit ' . $offset . ',' . $itemsToGet . ' '; } $db = Loader::db(); if ($this->debug) { Database::setDebug(true); } //echo $q.'<br>'; $resp = $db->GetAll($q); if ($this->debug) { Database::setDebug(false); } $this->start = $offset; return $resp; }