/** * Creates an Movie object based on a DB row. * * @param array $row The DB row containing Movie data. * @return \MyMovies\Domain\Movie */ private function buildMovie(array $row) { $movie = new Movie(); $movie->setId($row['mov_id']); $movie->setTitle($row['mov_title']); $movie->setDescriptionShort($row['mov_description_short']); $movie->setDescriptionLong($row['mov_description_long']); $movie->setDirector($row['mov_director']); $movie->setYear($row['mov_year']); $movie->setImage($row['mov_image']); $movie->setCatId($row['cat_id']); return $movie; }
/** * Creates an Movie object based on a DB row. * * @param array $row The DB row containing Movie data. * @return \MyMovies\Domain\Movie */ protected function buildDomainObject($row) { $mov = new Movie(); $mov->setMovId($row['mov_id']); $mov->setMovTitle($row['mov_title']); $mov->setMovDescriptionShort($row['mov_description_short']); $mov->setMovDescriptionLong($row['mov_description_long']); $mov->setMovDirector($row['mov_director']); $mov->setMovYear($row['mov_year']); $mov->setMovImage($row['mov_image']); $mov->setCatId($row['cat_id']); return $mov; }