public function StudList($groupid) { $groupid = intval($groupid); if (isset($this->_cache['StudList'][$groupid])) { return $this->_cache['StudList'][$groupid]; } $list = $this->models->InstanceClass('StudList'); $rows = RecordBookQuery::StudList($this->db, $groupid); while ($d = $this->db->fetch_array($rows)) { $list->Add($this->models->InstanceClass('StudItem', $d)); } return $this->_cache['StudList'][$groupid] = $list; }