private static function search($title, $year) { $title = OmdbService::removeYearFromTitle($title); $params = array('plot' => 'short', 'r' => 'json', 'y' => $year, 't' => $title); $response = CURL::get(self::$URL, $params); return json_decode($response, true); }
private static function setupBasicData($movie) { $omdbJson = OmdbService::searchByImdb($movie->imdb_id); $movie->short_info = $omdbJson['Plot']; $movie->poster_url = $omdbJson['Poster']; $movie->imdb_rating = $omdbJson['imdbRating']; $movie->tomato_meter = $omdbJson['tomatoUserMeter']; }