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_Hospital(); $entry->setId($row->id)->setName($row->name)->setAvatar($row->avatar)->setEmail($row->email)->setDepartments($row->departments)->setType($row->type)->setCertified($row->certified)->setCity($row->city)->setLabel($row->label)->setCountry($row->country)->setPoint($row->point)->setArea($row->area)->setPasswd($row->passwd)->setPhone($row->phone)->setIntroduction($row->introduction)->setLongitude($row->longitude)->setLatitude($row->latitude)->setCtime($row->ctime)->setUtime($row->utime)->setStatus($row->status); $entry->setNew(false); $entries[] = $entry; } return $entries; }