Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 1 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * This program is free software; you can redistribute it and/or modify |
4 | * it under the terms of the GNU General Public License as published by |
5 | * the Free Software Foundation; either version 2 of the License, or |
6 | * (at your option) any later version. |
7 | * |
8 | * This program is distributed in the hope that it will be useful, |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. |
12 | * |
13 | * You should have received a copy of the GNU General Public License along |
14 | * with this program; if not, write to the Free Software Foundation, Inc., |
15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
16 | * http://www.gnu.org/copyleft/gpl.html |
17 | * |
18 | * @file |
19 | */ |
20 | |
21 | namespace MediaWiki\Logging; |
22 | |
23 | use MediaWiki\Title\Title; |
24 | use MediaWiki\User\UserIdentity; |
25 | |
26 | /** |
27 | * An individual log entry. |
28 | * |
29 | * This is the basis for methods that all log entries support. |
30 | * |
31 | * Must not be implemented directly by extensions, extend LogEntryBase instead. |
32 | * |
33 | * @stable to type |
34 | * @since 1.19 |
35 | * @author Niklas Laxström |
36 | */ |
37 | interface LogEntry { |
38 | |
39 | /** |
40 | * The main log type. |
41 | * |
42 | * @return string |
43 | */ |
44 | public function getType(); |
45 | |
46 | /** |
47 | * The log subtype. |
48 | * |
49 | * @return string |
50 | */ |
51 | public function getSubtype(); |
52 | |
53 | /** |
54 | * The full logtype in format maintype/subtype. |
55 | * |
56 | * @return string |
57 | */ |
58 | public function getFullType(); |
59 | |
60 | /** |
61 | * Get the extra parameters stored for this message. |
62 | * This will be in the same format as setParameters(), ie. the array keys |
63 | * might include message formatting prefixes. |
64 | * |
65 | * @return array |
66 | * @see ManualLogEntry::setParameters() for message formatting prefixes. |
67 | */ |
68 | public function getParameters(); |
69 | |
70 | /** |
71 | * @since 1.36 |
72 | * @return UserIdentity |
73 | */ |
74 | public function getPerformerIdentity(): UserIdentity; |
75 | |
76 | /** |
77 | * Get the target page of this action. |
78 | * |
79 | * @return Title |
80 | */ |
81 | public function getTarget(); |
82 | |
83 | /** |
84 | * Get the timestamp when the action was executed. |
85 | * |
86 | * @return string TS_MW timestamp, a string with 14 digits |
87 | */ |
88 | public function getTimestamp(); |
89 | |
90 | /** |
91 | * Get the user provided comment. |
92 | * |
93 | * @return string |
94 | */ |
95 | public function getComment(); |
96 | |
97 | /** |
98 | * Get the access restriction. |
99 | * |
100 | * @return int |
101 | */ |
102 | public function getDeleted(); |
103 | |
104 | /** |
105 | * @param int $field One of LogPage::DELETED_* bitfield constants |
106 | * @return bool |
107 | */ |
108 | public function isDeleted( $field ); |
109 | } |
110 | |
111 | /** @deprecated class alias since 1.44 */ |
112 | class_alias( LogEntry::class, 'LogEntry' ); |