public function find($trainingId,Pment_Models_Training $training) { $resultSet = $this->getDbTable()->find($trainingId); if (0 == count($resultSet)) { return; } $row = $resultSet->current(); $training->setTraId($row->traId) ->setProjectId($row->projectId) ->setTraDate($row->traDate) ->setContent($row->content) ->setName($row->name) ->setContactId($row->contactId) ->setRemark($row->remark) ->setCTime($row->cTime); $contacts = new Employee_Models_ContactMapper(); $contactName = $contacts->findContactName($training->getContactId()); $training->setContactName($contactName); }