1 | <?php |
||
12 | class Error |
||
13 | { |
||
14 | /** |
||
15 | * Application Object |
||
16 | * |
||
17 | * @var \System\Application |
||
18 | */ |
||
19 | private $app; |
||
20 | |||
21 | /** |
||
22 | * Constructor |
||
23 | * |
||
24 | * @param \System\Application $app |
||
25 | */ |
||
26 | public function __construct(Application $app) |
||
30 | |||
31 | /** |
||
32 | * Check if the errors should be displayed |
||
33 | * |
||
34 | * @return bool |
||
35 | */ |
||
36 | public function allowDisplayingError() |
||
40 | |||
41 | /** |
||
42 | * Show error |
||
43 | * |
||
44 | * @return void |
||
45 | */ |
||
46 | private function showError() |
||
50 | |||
51 | /** |
||
52 | * Hide error |
||
53 | * |
||
54 | * @return void |
||
55 | */ |
||
56 | private function hideError() |
||
60 | |||
61 | /** |
||
62 | * Show or hide errors depend on the condition |
||
63 | * |
||
64 | * @return mixed |
||
65 | */ |
||
66 | public function start() |
||
77 | |||
78 | /** |
||
79 | * Send Email to the admin contain the Error |
||
80 | * and the date |
||
81 | * |
||
82 | * @property object $email |
||
83 | * @param string $error |
||
84 | * @return void |
||
85 | */ |
||
86 | private function sendErrorToAdmin($error) |
||
93 | |||
94 | /** |
||
95 | * Run error handling of Whoops |
||
96 | * |
||
97 | * @return void |
||
98 | */ |
||
99 | private function whoops() |
||
114 | |||
115 | /** |
||
116 | * Display friendly error to the users |
||
117 | * |
||
118 | * @property object $view |
||
119 | * @return void |
||
120 | */ |
||
121 | private function displayFriendlyMessage() |
||
131 | |||
132 | /** |
||
133 | * Check for last errors |
||
134 | * if there are errors than send continue to report the admin |
||
135 | * and display a friendly error to the users |
||
136 | * |
||
137 | * @return void |
||
138 | */ |
||
139 | public function handleErrors() |
||
158 | } |
||
159 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.