Example #1
0
 /**
  * getList
  *
  * @param Query    $query
  * @param integer  $start
  * @param integer  $limit
  *
  * @return  \stdClass[]
  */
 public function getList(Query $query, $start = null, $limit = null)
 {
     $query->limit($start, $limit);
     if (WINDWALKER_DEBUG) {
         $profiler = Ioc::getProfiler();
         $profiler->mark(uniqid() . ' - ' . (string) $query->dump());
     }
     $select = $query->select;
     $select = str_replace('SELECT ', 'SQL_CALC_FOUND_ROWS ', $select);
     $query->clear('select')->select($select);
     return $this->db->getReader($query)->loadObjectList();
 }
Example #2
0
 /**
  * getList
  *
  * @param Query   $query
  * @param integer $start
  * @param integer $limit
  *
  * @return  \stdClass[]
  * @throws \RuntimeException
  *
  * @deprecated  No use in current version. Will combined into getItems().
  */
 public function getList(Query $query, $start = null, $limit = null)
 {
     $query->limit($limit, $start);
     return $this->db->getReader($query)->loadObjectList();
 }