1 | <?php |
||
12 | class DatabaseLogReader { |
||
13 | |||
14 | private static $titleCache = []; |
||
15 | private $query; |
||
16 | private $log; |
||
17 | private $dbr; |
||
18 | private $titleKey; |
||
19 | private $type; |
||
20 | |||
21 | /** |
||
22 | * @param DatabaseaBase $dbr injected connection |
||
23 | * @param string $titleKey from page name |
||
24 | * @param string $type of log (default: approval) |
||
25 | */ |
||
26 | public function __construct( DatabaseBase $dbr, $titleKey, $type = 'approval' ) { |
||
31 | |||
32 | /** |
||
33 | * Take care of loading from the cache or filling the query. |
||
34 | */ |
||
35 | private function init() { |
||
53 | |||
54 | /** |
||
55 | * Fetch the results using our conditions |
||
56 | * |
||
57 | * @return IResultWrapper |
||
58 | * @throws DBError |
||
59 | */ |
||
60 | private function getLog() { |
||
76 | |||
77 | /** |
||
78 | * Fetch the query parameters for later calls |
||
79 | * |
||
80 | * @return array of parameters for SELECT call |
||
81 | */ |
||
82 | public function getQuery() { |
||
85 | |||
86 | /** |
||
87 | * @return User |
||
88 | */ |
||
89 | public function getUserForLogEntry() { |
||
96 | |||
97 | /** |
||
98 | * @return Timestamp |
||
99 | */ |
||
100 | public function getDateOfLogEntry() { |
||
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | public function getStatusOfLogEntry() { |
||
118 | } |
||
119 |