/** * Returns the round. * * @param Entity\RoundImpl $modelRound * @return RoundIterator * @throws RDException */ public function restore($modelRound) { //echo 'restore model roind' . var_dump($modelRound); $q = 'SELECT * from team10.round WHERE 1=1 '; if ($modelRound != NULL) { if ($modelRound->getNumber() != NULL) { $q .= ' AND number = ' . $modelRound->getNumber(); } if ($modelRound->getId() != -1) { $q .= ' AND round_id = ' . $modelRound->getId(); } if ($modelRound->getLeague() != null) { $q .= " AND league_id = " . $modelRound->getLeague()->getId(); } } $stmt = $this->dbConnection->prepare($q . ';'); if ($stmt->execute()) { //get results from Query $resultSet = $stmt->fetchAll(\PDO::FETCH_ASSOC); // return iterator //echo " round manager line 104" .var_dump($resultSet); return new RoundIterator($resultSet, $this->objLayer); } else { throw new RDException('Error restoring round model'); } }