load(); } //Methods: //Returns an array with the titles of the available movies. public function getFilms(){ return $this->films; } //Returns an array with the descriptions of the available movies. public function getDescription(){ $this->loadDescriptions(); return $this->descriptions; } //Load the list of tittles of the movies. private function load(){ $this->films = array(); $tittles = new Film_DAO("complucine"); $reply = $tittles->tittleFilmData(); if($reply && $reply->num_rows>0){ $i = 0; while ($row = $reply->fetch_assoc()){ foreach($row as $key => $value){ $this->films[$i] = $value; } $i++; } } $reply->free(); } private function loadDescriptions(){ $this->descriptions = array(); $desc = new Film_DAO("complucine"); $reply = $desc->descriptionFilmData(); if($reply && $reply->num_rows>0){ $i = 0; while ($row = $reply->fetch_assoc()){ foreach($row as $key => $value){ $this->descriptions[$i] = $value; } $i++; } } $reply->free(); } } ?>