2011-09-07 15:32:37 +00:00
|
|
|
<?php
|
|
|
|
|
/**
|
2019-04-14 01:05:34 +00:00
|
|
|
* Contains a class for dealing with individual log entries
|
2011-09-07 15:32:37 +00:00
|
|
|
*
|
2012-04-30 07:16:10 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
|
*
|
2011-09-07 15:32:37 +00:00
|
|
|
* @file
|
|
|
|
|
* @author Niklas Laxström
|
2018-05-23 23:23:42 +00:00
|
|
|
* @license GPL-2.0-or-later
|
2011-09-07 15:32:37 +00:00
|
|
|
* @since 1.19
|
|
|
|
|
*/
|
|
|
|
|
|
2021-02-15 18:53:00 +00:00
|
|
|
use MediaWiki\User\UserIdentity;
|
|
|
|
|
|
2011-09-07 15:32:37 +00:00
|
|
|
/**
|
|
|
|
|
* Interface for log entries. Every log entry has these methods.
|
2015-12-28 23:56:18 +00:00
|
|
|
*
|
2020-06-26 14:23:02 +00:00
|
|
|
* @unstable for implementation, extensions should subclass LogEntryBase instead.
|
2011-09-07 15:32:37 +00:00
|
|
|
* @since 1.19
|
|
|
|
|
*/
|
|
|
|
|
interface LogEntry {
|
2015-12-28 23:56:18 +00:00
|
|
|
|
2011-09-07 15:32:37 +00:00
|
|
|
/**
|
|
|
|
|
* The main log type.
|
2015-12-28 23:56:18 +00:00
|
|
|
*
|
2011-09-07 15:32:37 +00:00
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getType();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The log subtype.
|
2015-12-28 23:56:18 +00:00
|
|
|
*
|
2011-09-07 15:32:37 +00:00
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getSubtype();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The full logtype in format maintype/subtype.
|
2015-12-28 23:56:18 +00:00
|
|
|
*
|
2011-09-07 15:32:37 +00:00
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getFullType();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the extra parameters stored for this message.
|
2015-12-28 23:56:18 +00:00
|
|
|
*
|
2011-09-07 15:32:37 +00:00
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
public function getParameters();
|
|
|
|
|
|
2021-02-15 18:53:00 +00:00
|
|
|
/**
|
|
|
|
|
* @since 1.36
|
|
|
|
|
* @return UserIdentity
|
|
|
|
|
*/
|
|
|
|
|
public function getPerformerIdentity(): UserIdentity;
|
|
|
|
|
|
2011-09-07 15:32:37 +00:00
|
|
|
/**
|
|
|
|
|
* Get the target page of this action.
|
2015-12-28 23:56:18 +00:00
|
|
|
*
|
2011-09-07 15:32:37 +00:00
|
|
|
* @return Title
|
|
|
|
|
*/
|
|
|
|
|
public function getTarget();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the timestamp when the action was executed.
|
2015-12-28 23:56:18 +00:00
|
|
|
*
|
2011-09-07 15:32:37 +00:00
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getTimestamp();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the user provided comment.
|
2015-12-28 23:56:18 +00:00
|
|
|
*
|
2011-09-07 15:32:37 +00:00
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getComment();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the access restriction.
|
2015-12-28 23:56:18 +00:00
|
|
|
*
|
2019-04-06 06:31:16 +00:00
|
|
|
* @return int
|
2011-09-07 15:32:37 +00:00
|
|
|
*/
|
|
|
|
|
public function getDeleted();
|
|
|
|
|
|
|
|
|
|
/**
|
2014-04-19 20:22:20 +00:00
|
|
|
* @param int $field One of LogPage::DELETED_* bitfield constants
|
|
|
|
|
* @return bool
|
2011-09-07 15:32:37 +00:00
|
|
|
*/
|
|
|
|
|
public function isDeleted( $field );
|
|
|
|
|
}
|