Recommend this page to a friend! |
Download .zip |
Info | View files (103) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2021-01-28 (1 month ago) | 50% | Total: 109 | All time: 9,342 This week: 312 |
Version | License | PHP version | Categories | |||
thesportsdb 1.0.9 | GNU General Publi... | 5.5 | PHP 5, Games, Web services |
Description | Author | |||
This package can get game information from the Sports DB site API. Innovation Award
|
PHP Library to connect to the api of http://thesportsdb.com/
<?php
include_once __DIR__ . '/default_bootstrap.php';
// Get all sports.
$sports = $db->getSports();
// Print the first sport.
$sport = reset($sports);
print_r($sport->raw());
// Get the leagues of this sport (lazy loaded).
$leagues = $sport->getLeagues();
// Print the first league.
$league = reset($leagues);
print_r($league->raw());
// Get the seasons for this league.
$seasons = $league->getSeasons();
// Print the first season.
$season = reset($seasons);
print_r($season->raw());
// 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().
$event->getName();
print_r($event->raw());
Files |
File | Role | Description | ||
---|---|---|---|---|
config (1 file) | ||||
src (1 file, 3 directories) | ||||
tests (1 file, 1 directory) | ||||
.codeclimate.ruleset.xml | Data | Auxiliary data | ||
.codeclimate.yml | Data | Auxiliary data | ||
.scrutinizer.yml | Data | Auxiliary data | ||
.travis.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
default_bootstrap.php | Conf. | Configuration script | ||
default_bootstrap_dic.php | Conf. | Configuration script | ||
LICENSE | Lic. | License | ||
phpunit.xml | Data | Auxiliary data | ||
README.md | Data | Auxiliary data |
Files | / | src |
File | Role | Description | ||
---|---|---|---|---|
Entity (19 files, 3 directories) | ||||
Http (2 files) | ||||
PropertyMapper (3 files, 1 directory) | ||||
TheSportsDb.php | Class | Class source |
Files | / | src | / | Entity |
File | Role | Description | ||
---|---|---|---|---|
Factory (4 files) | ||||
Proxy (8 files) | ||||
Repository (16 files) | ||||
Entity.php | Class | Class source | ||
EntityInterface.php | Class | Class source | ||
EntityManager.php | Class | Class source | ||
EntityManagerConsumerInterface.php | Class | Class source | ||
EntityManagerConsumerTrait.php | Class | Class source | ||
EntityManagerInterface.php | Class | Class source | ||
EntityPropertyUtil.php | Class | Class source | ||
Event.php | Class | Class source | ||
EventInterface.php | Class | Class source | ||
League.php | Class | Class source | ||
LeagueInterface.php | Class | Class source | ||
Player.php | Class | Class source | ||
PlayerInterface.php | Class | Class source | ||
Season.php | Class | Class source | ||
SeasonInterface.php | Class | Class source | ||
Sport.php | Class | Class source | ||
SportInterface.php | Class | Class source | ||
Team.php | Class | Class source | ||
TeamInterface.php | Class | Class source |
Files | / | src | / | Entity | / | Factory |
File | Role | Description |
---|---|---|
Factory.php | Class | Class source |
FactoryContainer.php | Class | Class source |
FactoryContainerInterface.php | Class | Class source |
FactoryInterface.php | Class | Class source |
Files | / | src | / | Entity | / | Proxy |
File | Role | Description |
---|---|---|
EventProxy.php | Class | Class source |
LeagueProxy.php | Class | Class source |
PlayerProxy.php | Class | Class source |
Proxy.php | Class | Class source |
ProxyInterface.php | Class | Class source |
SeasonProxy.php | Class | Class source |
SportProxy.php | Class | Class source |
TeamProxy.php | Class | Class source |
Files | / | src | / | Entity | / | Repository |
File | Role | Description |
---|---|---|
EventRepository.php | Class | Class source |
EventRepositoryInterface.php | Class | Class source |
LeagueRepository.php | Class | Class source |
LeagueRepositoryInterface.php | Class | Class source |
PlayerRepository.php | Class | Class source |
PlayerRepositoryInterface.php | Class | Class source |
Repository.php | Class | Class source |
RepositoryContainer.php | Class | Class source |
RepositoryContainerInterface.php | Class | Class source |
RepositoryInterface.php | Class | Class source |
SeasonRepository.php | Class | Class source |
SeasonRepositoryInterface.php | Class | Class source |
SportRepository.php | Class | Class source |
SportRepositoryInterface.php | Class | Class source |
TeamRepository.php | Class | Class source |
TeamRepositoryInterface.php | Class | Class source |
Files | / | src | / | Http |
File | Role | Description |
---|---|---|
TheSportsDbClient.php | Class | Class source |
TheSportsDbClientInterface.php | Class | Class source |
Files | / | src | / | PropertyMapper |
File | Role | Description | ||
---|---|---|---|---|
Transformer (1 file) | ||||
PropertyDefinition.php | Class | Class source | ||
PropertyMap.php | Class | Class source | ||
PropertyMapDefinition.php | Class | Class source |
Files | / | tests | / | src |
File | Role | Description | ||
---|---|---|---|---|
Entity (12 files, 3 directories) | ||||
Http (1 file) | ||||
PropertyMapper (3 files, 1 directory) | ||||
TheSportsDbTest.php | Class | Class source |
Files | / | tests | / | src | / | Entity |
File | Role | Description | ||
---|---|---|---|---|
Factory (2 files) | ||||
Proxy (8 files) | ||||
Repository (9 files) | ||||
AbstractEntityTest.php | Class | Class source | ||
EntityManagerConsumerTraitTest.php | Class | Class source | ||
EntityManagerTest.php | Class | Class source | ||
EntityPropertyUtilTest.php | Class | Class source | ||
EntityTest.php | Class | Class source | ||
EventTest.php | Class | Class source | ||
LeagueTest.php | Class | Class source | ||
PlayerTest.php | Class | Class source | ||
SeasonTest.php | Class | Class source | ||
SportTest.php | Class | Class source | ||
TeamTest.php | Class | Class source | ||
TestEntity.php | Class | Class source |
Files | / | tests | / | src | / | Entity | / | Factory |
File | Role | Description |
---|---|---|
FactoryContainerTest.php | Class | Class source |
FactoryTest.php | Class | Class source |
Files | / | tests | / | src | / | Entity | / | Proxy |
File | Role | Description |
---|---|---|
EventProxyTest.php | Class | Class source |
LeagueProxyTest.php | Class | Class source |
PlayerProxyTest.php | Class | Class source |
ProxyTest.php | Class | Class source |
SeasonProxyTest.php | Class | Class source |
SportProxyTest.php | Class | Class source |
TeamProxyTest.php | Class | Class source |
TestEntityProxy.php | Class | Class source |
Files | / | tests | / | src | / | Entity | / | Repository |
File | Role | Description |
---|---|---|
EventRepositoryTest.php | Class | Class source |
LeagueRepositoryTest.php | Class | Class source |
PlayerRepositoryTest.php | Class | Class source |
RepositoryContainerTest.php | Class | Class source |
RepositoryTest.php | Class | Class source |
SeasonRepositoryTest.php | Class | Class source |
SportRepositoryTest.php | Class | Class source |
TeamRepositoryTest.php | Class | Class source |
TestRepository.php | Class | Class source |
Files | / | tests | / | src | / | PropertyMapper |
File | Role | Description | ||
---|---|---|---|---|
Transformer (1 file) | ||||
PropertyDefinitionTest.php | Class | Class source | ||
PropertyMapDefinitionTest.php | Class | Class source | ||
PropertyMapTest.php | Class | Class source |
Files | / | tests | / | src | / | PropertyMapper | / | Transformer |
File | Role | Description |
---|---|---|
CallbackTest.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.