PHP Library to connect to the api of http://thesportsdb.com/
include_once __DIR__ . '/default_bootstrap.php';
// Get all sports.
$sports = $db->getSports();
// Print the first sport.
$sport = reset($sports);
// Get the leagues of this sport (lazy loaded).
$leagues = $sport->getLeagues();
// Print the first league.
$league = reset($leagues);
// Get the seasons for this league.
$seasons = $league->getSeasons();
// Print the first season.
$season = reset($seasons);
// Get the events for this league.
$events = $season->getEvents();
// Print the first event.
$event = reset($events);
// Trigger lazy load, the full event object will be loaded when calling $event->raw().