/** * 返回当前页对应的记录集 * * @param string $fields * @param boolean $queryLinks * * @return array */ function &findAll($fields = '*', $queryLinks = true) { if ($this->count == -1) { $this->count = 20; } $offset = ($this->currentPage - $this->_basePageIndex) * $this->pageSize; if (is_object($this->source)) { $limit = array($this->pageSize, $offset); $rowset = $this->source->findAll($this->_conditions, $this->_sortby, $limit, $fields, $queryLinks); } else { if (is_null($this->dbo)) { $this->dbo =& FLEA::getDBO(false); } $rs = $this->dbo->selectLimit($this->source, $this->pageSize, $offset); $rowset = $this->dbo->getAll($rs); } return $rowset; }
/** * 取得所有用户组 * * @return array */ function getAllGroups() { return parent::findAll('left_value > 1', 'left_value ASC'); }