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 | public function clearCache() { |
||
35 | |||
36 | /** |
||
37 | * Take care of loading from the cache or filling the query. |
||
38 | */ |
||
39 | private function init() { |
||
57 | |||
58 | /** |
||
59 | * Fetch the results using our conditions |
||
60 | * |
||
61 | * @return IResultWrapper |
||
62 | * @throws DBError |
||
63 | */ |
||
64 | private function getLog() { |
||
81 | |||
82 | /** |
||
83 | * Fetch the query parameters for later calls |
||
84 | * |
||
85 | * @return array of parameters for SELECT call |
||
86 | */ |
||
87 | public function getQuery() { |
||
90 | |||
91 | /** |
||
92 | * @return User |
||
93 | */ |
||
94 | public function getUserForLogEntry() { |
||
101 | |||
102 | /** |
||
103 | * @return Timestamp |
||
104 | */ |
||
105 | public function getDateOfLogEntry() { |
||
112 | |||
113 | /** |
||
114 | * @return string |
||
115 | */ |
||
116 | public function getStatusOfLogEntry() { |
||
123 | } |
||
124 |