mbid)) { $query = 'mbid=' . rawurlencode($artist->mbid); } else { $query = 'artist=' . rawurlencode($artist->name); } $limit = AmpConfig::get('concerts_limit_future'); if ($limit) { $query .= '&limit=' . $limit; } $xml = Recommendation::get_lastfm_results('artist.getevents', $query); if ($xml->events) { return $xml->events; } return false; } /** * get_past_events * Returns a list of past events * @param Artist $artist * @return SimpleXMLElement|boolean */ public static function get_past_events(Artist $artist) { if (isset($artist->mbid)) { $query = 'mbid=' . rawurlencode($artist->mbid); } else { $query = 'artist=' . rawurlencode($artist->name); } $limit = AmpConfig::get('concerts_limit_past'); if ($limit) { $query .= '&limit=' . $limit; } $xml = Recommendation::get_lastfm_results('artist.getpastevents', $query); if ($xml->events) { return $xml->events; } return false; } } // end of recommendation class