/** * @param TeamStat $stat * @return TeamInfo */ private function getTeam(TeamStat $stat) { $team = new TeamInfo(); $team->setId($stat->getId()); $team->setClub($stat->getClub()); $team->setName($stat->getName()); $team->setCountry($stat->getCountry()); $team->setGroup($stat->getGroup()); return $team; }
private function copyStat($tieTeamList) { $teamMap = array(); /* @var $tieStat TeamStat */ foreach ($tieTeamList as $tieStat) { // Make a fresh copy of status object $stat = new TeamStat(); $stat->setId($tieStat->getId()); $teamMap[$stat->getId()] = $stat; } // teamMap is now a copy of the team order in tieTeamList return $teamMap; }