Debian Codegraph @

includes/logging/LogEntry.php

raw symbols SCIP
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 use MediaWiki\Title\Title;
22 use MediaWiki\User\UserIdentity;
23
24 /**
25 * An individual log entry.
26 *
27 * This is the basis for methods that all log entries support.
28 *
29 * Must not be implemented directly by extensions, extend LogEntryBase instead.
30 *
31 * @stable to type
32 * @since 1.19
33 * @author Niklas Laxström
34 */
35 interface LogEntry {
36
37 /**
38 * The main log type.
39 *
40 * @return string
41 */
42 public function getType();
43
44 /**
45 * The log subtype.
46 *
47 * @return string
48 */
49 public function getSubtype();
50
51 /**
52 * The full logtype in format maintype/subtype.
53 *
54 * @return string
55 */
56 public function getFullType();
57
58 /**
59 * Get the extra parameters stored for this message.
60 * This will be in the same format as setParameters(), ie. the array keys
61 * might include message formatting prefixes.
62 *
63 * @return array
64 * @see ManualLogEntry::setParameters() for message formatting prefixes.
65 */
66 public function getParameters();
67
68 /**
69 * @since 1.36
70 * @return UserIdentity
71 */
72 public function getPerformerIdentity(): UserIdentity;
73
74 /**
75 * Get the target page of this action.
76 *
77 * @return Title
78 */
79 public function getTarget();
80
81 /**
82 * Get the timestamp when the action was executed.
83 *
84 * @return string TS_MW timestamp, a string with 14 digits
85 */
86 public function getTimestamp();
87
88 /**
89 * Get the user provided comment.
90 *
91 * @return string
92 */
93 public function getComment();
94
95 /**
96 * Get the access restriction.
97 *
98 * @return int
99 */
100 public function getDeleted();
101
102 /**
103 * @param int $field One of LogPage::DELETED_* bitfield constants
104 * @return bool
105 */
106 public function isDeleted( $field );
107 }