1 | <?php |
||
22 | class Dispatcher extends Singleton |
||
23 | { |
||
24 | /** |
||
25 | * @Inyectable |
||
26 | * @var \PSFS\base\Security $security |
||
27 | */ |
||
28 | protected $security; |
||
29 | /** |
||
30 | * @Inyectable |
||
31 | * @var \PSFS\base\Router $router |
||
32 | */ |
||
33 | protected $router; |
||
34 | /** |
||
35 | * @Inyectable |
||
36 | * @var \PSFS\base\Request $parser |
||
37 | */ |
||
38 | protected $parser; |
||
39 | /** |
||
40 | * @Inyectable |
||
41 | * @var \PSFS\base\Logger $log |
||
42 | */ |
||
43 | protected $log; |
||
44 | /** |
||
45 | * @Inyectable |
||
46 | * @var \PSFS\base\config\Config $config |
||
47 | */ |
||
48 | protected $config; |
||
49 | |||
50 | protected $ts; |
||
|
|||
51 | protected $mem; |
||
52 | |||
53 | private $actualUri; |
||
54 | |||
55 | /** |
||
56 | * Initializer method |
||
57 | */ |
||
58 | public function init() |
||
68 | |||
69 | /** |
||
70 | * Run method |
||
71 | * @return string HTML |
||
72 | */ |
||
73 | public function run() |
||
94 | |||
95 | /** |
||
96 | * Method that convert an exception to html |
||
97 | * |
||
98 | * @param \Exception $e |
||
99 | * |
||
100 | * @return string HTML |
||
101 | */ |
||
102 | protected function dumpException(\Exception $e) |
||
116 | |||
117 | /** |
||
118 | * Method that returns the memory used at this specific moment |
||
119 | * |
||
120 | * @param $unit string |
||
121 | * |
||
122 | * @return int |
||
123 | */ |
||
124 | public function getMem($unit = "Bytes") |
||
140 | |||
141 | /** |
||
142 | * Method that returns the seconds spent with the script |
||
143 | * @return double |
||
144 | */ |
||
145 | public function getTs() |
||
149 | |||
150 | /** |
||
151 | * Debug function to catch warnings as exceptions |
||
152 | */ |
||
153 | protected function bindWarningAsExceptions() |
||
162 | |||
163 | /** |
||
164 | * Stats initializer |
||
165 | */ |
||
166 | private function initiateStats() |
||
176 | |||
177 | } |
||
178 |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.