MediaWiki  master
LogEntryBase.php
Go to the documentation of this file.
1 <?php
31 abstract class LogEntryBase implements LogEntry {
32 
33  public function getFullType() {
34  return $this->getType() . '/' . $this->getSubtype();
35  }
36 
37  public function isDeleted( $field ) {
38  return ( $this->getDeleted() & $field ) === $field;
39  }
40 
47  public function isLegacy() {
48  return false;
49  }
50 
58  public static function makeParamBlob( $params ) {
59  return serialize( (array)$params );
60  }
61 
69  public static function extractParams( $blob ) {
70  return unserialize( $blob );
71  }
72 }
isLegacy()
Whether the parameters for this log are stored in new or old format.
serialize()
Interface for log entries.
Definition: LogEntry.php:31
getDeleted()
Get the access restriction.
isDeleted( $field)
getSubtype()
The log subtype.
getType()
The main log type.
unserialize( $serialized)
getFullType()
The full logtype in format maintype/subtype.
static extractParams( $blob)
Extract a parameter array from a blob.
Extends the LogEntry Interface with some basic functionality.
static makeParamBlob( $params)
Create a blob from a parameter array.