1 | <?php |
||
18 | class TheSportsDb implements EntityManagerConsumerInterface { |
||
19 | |||
20 | use EntityManagerConsumerTrait; |
||
21 | |||
22 | /** |
||
23 | * Creates a new TheSportsDb instance |
||
24 | */ |
||
25 | public function __construct(EntityManagerInterface $entityManager = NULL) { |
||
30 | |||
31 | public function getSports() { |
||
34 | |||
35 | /** |
||
36 | * Get a sport by name. |
||
37 | * |
||
38 | * @param string $name |
||
39 | * The sport name. |
||
40 | * |
||
41 | * @return \TheSportsDb\Entity\SportInterface |
||
42 | */ |
||
43 | public function getSport($name) { |
||
46 | |||
47 | public function getLeagues() { |
||
50 | |||
51 | /** |
||
52 | * Get a league by id. |
||
53 | * |
||
54 | * @param int $leagueId |
||
55 | * The league id. |
||
56 | * |
||
57 | * @return \TheSportsDb\Entity\LeagueInterface |
||
58 | */ |
||
59 | public function getLeague($leagueId) { |
||
62 | |||
63 | public function getLeaguesByCountry($country) { |
||
66 | |||
67 | public function getLeaguesBySport($sport) { |
||
70 | |||
71 | public function getLeaguesByCountryAndSport($country, $sport) { |
||
74 | |||
75 | public function getTeam($teamId) { |
||
78 | |||
79 | public function getTeamByName($teamName) { |
||
82 | |||
83 | public function getTeamsByLeague($leagueId) { |
||
86 | |||
87 | public function getTeamsByLeagueName($leagueName) { |
||
90 | |||
91 | public function getTeamsBySportAndCountry($sport, $country) { |
||
94 | |||
95 | public function getPlayer($playerId) { |
||
98 | |||
99 | public function getPlayersByTeam($teamId) { |
||
102 | |||
103 | public function getPlayersByTeamName($teamName) { |
||
106 | |||
107 | public function getPlayersByName($teamName) { |
||
110 | |||
111 | public function getPlayersByTeamNameAndName($teamName, $name) { |
||
114 | |||
115 | public function getEvent($eventId) { |
||
118 | |||
119 | public function getEventsByName($name) { |
||
122 | |||
123 | public function getEventsByFileName($name) { |
||
126 | |||
127 | public function getEventsByNameAndSeason($name, $season) { |
||
130 | |||
131 | public function getNextFiveEventsByTeam($teamId) { |
||
134 | |||
135 | public function getNextFifteenEventsByLeague($leagueId) { |
||
138 | |||
139 | public function getNextFifteenEventsByLeagueAndRound($leagueId, $round) { |
||
142 | |||
143 | public function getLastFiveEventsByTeam($teamId) { |
||
146 | |||
147 | public function getLastFifteenEventsByLeague($leagueId) { |
||
150 | |||
151 | public function getEventsByDay(\DateTime $date, $sport = NULL, $leagueName = NULL) { |
||
154 | |||
155 | public function getEventsByLeagueRoundAndSeason($leagueId, $round, $season) { |
||
158 | |||
159 | public function getEventsByLeagueAndSeason($leagueId, $season) { |
||
162 | |||
163 | public function getSeasonsByLeague($leagueId) { |
||
166 | } |
||
167 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.