Split logging classes to individual files
[lhc/web/wiklou.git] / includes / logging / LogEntry.php
1 <?php
2 /**
3 * Contains a class for dealing with individual log entries
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
19 *
20 * @file
21 * @author Niklas Laxström
22 * @license GPL-2.0-or-later
23 * @since 1.19
24 */
25
26 /**
27 * Interface for log entries. Every log entry has these methods.
28 *
29 * @since 1.19
30 */
31 interface LogEntry {
32
33 /**
34 * The main log type.
35 *
36 * @return string
37 */
38 public function getType();
39
40 /**
41 * The log subtype.
42 *
43 * @return string
44 */
45 public function getSubtype();
46
47 /**
48 * The full logtype in format maintype/subtype.
49 *
50 * @return string
51 */
52 public function getFullType();
53
54 /**
55 * Get the extra parameters stored for this message.
56 *
57 * @return array
58 */
59 public function getParameters();
60
61 /**
62 * Get the user for performed this action.
63 *
64 * @return User
65 */
66 public function getPerformer();
67
68 /**
69 * Get the target page of this action.
70 *
71 * @return Title
72 */
73 public function getTarget();
74
75 /**
76 * Get the timestamp when the action was executed.
77 *
78 * @return string
79 */
80 public function getTimestamp();
81
82 /**
83 * Get the user provided comment.
84 *
85 * @return string
86 */
87 public function getComment();
88
89 /**
90 * Get the access restriction.
91 *
92 * @return int
93 */
94 public function getDeleted();
95
96 /**
97 * @param int $field One of LogPage::DELETED_* bitfield constants
98 * @return bool
99 */
100 public function isDeleted( $field );
101 }