1 | <?php |
||
7 | abstract class QueryManager { |
||
8 | |||
9 | protected static $time_offset; |
||
10 | protected static $config; |
||
11 | |||
12 | private static $current; |
||
13 | public static function current() { |
||
41 | |||
42 | // Misc |
||
43 | abstract public function getEcapedString($string); |
||
44 | |||
45 | // Tester |
||
46 | abstract public function testTotalPokemon(); |
||
49 | |||
50 | // Homepage |
||
51 | abstract public function getTotalPokemon(); |
||
58 | |||
59 | // Single Pokemon |
||
60 | abstract public function getGymsProtectedByPokemon($pokemon_id); |
||
67 | abstract public function getPokemonSliderMinMax(); |
||
68 | abstract public function getMapsCoords(); |
||
69 | abstract public function getPokemonCount($pokemon_id); |
||
70 | abstract public function getRaidCount($pokemon_id); |
||
71 | |||
72 | // Pokestops |
||
73 | abstract public function getTotalPokestops(); |
||
74 | abstract public function getAllPokestops(); |
||
75 | |||
76 | // Gyms |
||
77 | abstract public function getTeamGuardians($team_id); |
||
78 | abstract public function getOwnedAndPoints($team_id); |
||
79 | abstract public function getAllGyms(); |
||
80 | abstract public function getGymData($gym_id); |
||
81 | abstract public function getGymDefenders($gym_id); |
||
82 | |||
83 | // Gym History |
||
84 | abstract public function getGymHistories($gym_name, $team, $page, $ranking); |
||
85 | abstract public function getGymHistoriesPokemon($gym_id); |
||
86 | abstract public function getHistoryForGym($page, $gym_id); |
||
87 | |||
88 | // Raids |
||
89 | abstract public function getAllRaids($page); |
||
90 | |||
91 | // Trainers |
||
92 | abstract public function getTrainers($trainer_name, $team, $page, $ranking); |
||
93 | abstract public function getTrainerLevelCount($team_id); |
||
94 | |||
95 | // Cron |
||
96 | abstract public function getPokemonCountsActive(); |
||
97 | abstract public function getPokemonCountsLastDay(); |
||
98 | abstract public function getCaptchaCount(); |
||
100 | } |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.