MediaWiki master
LogEntryBase.php
Go to the documentation of this file.
1<?php
26namespace MediaWiki\Logging;
27
33abstract class LogEntryBase implements LogEntry {
34
35 public function getFullType() {
36 return $this->getType() . '/' . $this->getSubtype();
37 }
38
39 public function isDeleted( $field ) {
40 return ( $this->getDeleted() & $field ) === $field;
41 }
42
49 public function isLegacy() {
50 return false;
51 }
52
60 public static function makeParamBlob( $params ) {
61 return serialize( (array)$params );
62 }
63
71 public static function extractParams( $blob ) {
72 return unserialize( $blob );
73 }
74}
75
77class_alias( LogEntryBase::class, 'LogEntryBase' );
Extends the LogEntry Interface with some basic functionality.
static makeParamBlob( $params)
Create a blob from a parameter array.
getFullType()
The full logtype in format maintype/subtype.
isLegacy()
Whether the parameters for this log are stored in new or old format.
static extractParams( $blob)
Extract a parameter array from a blob.
An individual log entry.
Definition LogEntry.php:37
getType()
The main log type.
getDeleted()
Get the access restriction.
getSubtype()
The log subtype.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...