Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / logging / LogEntry.php
blob0f117ff8ceefb52e9599ef82077ed96579739383
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.
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.
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
18 * @file
21 use MediaWiki\Title\Title;
22 use MediaWiki\User\UserIdentity;
24 /**
25 * An individual log entry.
27 * This is the basis for methods that all log entries support.
29 * Must not be implemented directly by extensions, extend LogEntryBase instead.
31 * @stable to type
32 * @since 1.19
33 * @author Niklas Laxström
35 interface LogEntry {
37 /**
38 * The main log type.
40 * @return string
42 public function getType();
44 /**
45 * The log subtype.
47 * @return string
49 public function getSubtype();
51 /**
52 * The full logtype in format maintype/subtype.
54 * @return string
56 public function getFullType();
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.
63 * @return array
64 * @see ManualLogEntry::setParameters() for message formatting prefixes.
66 public function getParameters();
68 /**
69 * @since 1.36
70 * @return UserIdentity
72 public function getPerformerIdentity(): UserIdentity;
74 /**
75 * Get the target page of this action.
77 * @return Title
79 public function getTarget();
81 /**
82 * Get the timestamp when the action was executed.
84 * @return string TS_MW timestamp, a string with 14 digits
86 public function getTimestamp();
88 /**
89 * Get the user provided comment.
91 * @return string
93 public function getComment();
95 /**
96 * Get the access restriction.
98 * @return int
100 public function getDeleted();
103 * @param int $field One of LogPage::DELETED_* bitfield constants
104 * @return bool
106 public function isDeleted( $field );