private function _rowToObject(Zend_Db_Table_Row $row) { $issueRow = $row->findParentRow('Project_Model_Issue', 'Issue'); $issue = new Project_Model_Issue(); $issue->setId($issueRow->iss_id)->setName($issueRow->iss_name); $userRow = $row->findParentRow('User_Model_DbTable_Staffmembre', 'Staffmembre'); $user = new User_Model_Staffmembre(); $user->setId($userRow->usm_id)->setName($userRow->usm_name); $issueComment = new Project_Model_IssueComment(); $issueComment->setId($row->isc_id)->setContent($row->isc_content)->setDate($row->isc_date)->setIssue($issue)->setUser($user); return $issueComment; }
private function _rowToObject(Zend_Db_Table_Row $row) { $statusRow = $row->findParentRow('Project_Model_DbTable_IssueStatus', 'IssueStatus'); $status = new Project_Model_IssueStatus(); $status->setId($statusRow->istut_id)->setTitle($statusRow->istut_title); $typeRow = $row->findParentRow('Project_Model_DbTable_IssueType', 'IssueType'); $type = new Project_Model_IssueType(); $type->setId($typeRow->istyp_id)->setTitle($typeRow->istyp_title); $projectRow = $row->findParentRow('Project_Model_DbTable_Project', 'Project'); $projectMapper = new Project_Model_Mapper_Project(); $project = new Project_Model_Project(); $project = $projectMapper->rowToObject($projectRow); $userRow = $row->findParentRow('User_Model_DbTable_Staffmembre', 'Staffmembre'); $user = new User_Model_Staffmembre(); $user->setId($userRow->usm_id)->setLogin($userRow->usm_login); $issue = new Project_Model_Issue(); $issue->setId($row->iss_id)->setName($row->iss_name)->setDescription($row->iss_desc)->setDate($row->iss_date)->setStatus($status)->setType($type)->setProject($project)->setUser($user); return $issue; }