Beispiel #1
0
 protected function buildDomainObject($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']);
     if (array_key_exists('cat_id', $row)) {
         $categoryId = $row['cat_id'];
         $category = $this->categoryDAO->find($categoryId);
         $movie->setCategory($category);
     }
     return $movie;
 }