public static function fetchAll($where = null, $order = null, $limit = null, $offset = null) { $resultSet = self::getDbTable()->fetchAll($where, $order, $limit, $offset); $entries = array(); foreach ($resultSet as $row) { $entry = new Application_Model_O_DepartmentsHospitalMap(); $entry->setId($row->id)->setDepartment_id($row->department_id)->setHospital_id($row->hospital_id)->setSort($row->sort)->setCtime($row->ctime)->setUtime($row->utime)->setStatus($row->status); $entry->setNew(false); $entries[] = $entry; } return $entries; }