public function addReview($movieId)
 {
     $author = $this->app->request->post('author');
     $text = $this->app->request->post('text');
     $movieReview = new MovieReview();
     $movieReview->setAuthor($author)->setText($text)->setMovieId($movieId);
     $this->movieReviewRepository->save($movieReview);
     $this->app->flash('info', 'The review was successfully saved.');
     $this->app->redirect('/movies/' . $movieId);
 }
 function addReview($id)
 {
     $author = $this->app->request->post('author');
     $text = $this->app->request->post('text');
     $review = MovieReview::makeEmpty();
     $review->setAuthor($author);
     $review->setText($text);
     $review->setMovieId($id);
     $review->save();
     $this->app->flash('info', 'The review was successfully saved.');
     $this->app->redirect('/movies/' . $id);
 }
 public function makeFromRow($row)
 {
     $movieReview = new MovieReview();
     return $movieReview->setId($row['id'])->setAuthor($row['author'])->setText($row['text']);
 }