1 | <?php |
||
9 | class LogReader { |
||
10 | |||
11 | /** |
||
12 | * Get the person who made the last for this page |
||
13 | * |
||
14 | * @return User |
||
15 | */ |
||
16 | public function getUser() { |
||
19 | |||
20 | /** |
||
21 | * Get the date of the last entry in the log for this page |
||
22 | * |
||
23 | * @return Timestamp |
||
24 | */ |
||
25 | public function getDate() { |
||
28 | |||
29 | /** |
||
30 | * Get the status of the last entry in the log for this page |
||
31 | * |
||
32 | * @return Timestamp |
||
33 | */ |
||
34 | public function getStatus() { |
||
37 | |||
38 | /** |
||
39 | * Fetch the results using our conditions |
||
40 | * |
||
41 | * @return IResultWrapper |
||
42 | * @throws DBError |
||
43 | */ |
||
44 | protected function getLog() { |
||
55 | |||
56 | /** |
||
57 | * Fetch the query for later calls |
||
58 | * |
||
59 | * @return array |
||
60 | */ |
||
61 | public function getQuery() { |
||
64 | |||
65 | // The parameters for our query. |
||
66 | protected $query; |
||
67 | |||
68 | // The current log |
||
69 | protected $log; |
||
70 | |||
71 | // Don't run multiple queries if we don't have to |
||
72 | protected static $titleCache = []; |
||
73 | |||
74 | /** |
||
75 | * Constructor for reading the log. |
||
76 | * |
||
77 | * @param Title $title page |
||
78 | * @param string $type of log (default: approval) |
||
79 | */ |
||
80 | public function __construct( Title $title, $type = 'approval' ) { |
||
95 | } |
||
96 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.