예제 #1
0
 /**
  * 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)
 {
     $movie = new Movie();
     $movie->setMov_id($row['mod_id']);
     $movie->setMov_title($row['mov_title']);
     $movie->setMov_description_short($row['mov_description_short']);
     $movie->setMov_description_long($row['mov_description_long']);
     $movie->setMov_director($row['mov_director']);
     $movie->setMov_year($row['mov_year']);
     $movie->setMov_image($row['mov_image']);
     $movie->setCat_id($row['cat_id']);
     return $movie;
 }