MediaWiki  1.34.0
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 }
LogEntryBase\isLegacy
isLegacy()
Whether the parameters for this log are stored in new or old format.
Definition: LogEntryBase.php:47
serialize
serialize()
Definition: ApiMessageTrait.php:138
LogEntry\getType
getType()
The main log type.
$blob
$blob
Definition: testCompression.php:65
LogEntry
Interface for log entries.
Definition: LogEntry.php:31
LogEntryBase\isDeleted
isDeleted( $field)
Definition: LogEntryBase.php:37
LogEntryBase
Extends the LogEntry Interface with some basic functionality.
Definition: LogEntryBase.php:31
LogEntry\getDeleted
getDeleted()
Get the access restriction.
LogEntryBase\extractParams
static extractParams( $blob)
Extract a parameter array from a blob.
Definition: LogEntryBase.php:69
LogEntryBase\getFullType
getFullType()
The full logtype in format maintype/subtype.
Definition: LogEntryBase.php:33
LogEntry\getSubtype
getSubtype()
The log subtype.
unserialize
unserialize( $serialized)
Definition: ApiMessageTrait.php:146
LogEntryBase\makeParamBlob
static makeParamBlob( $params)
Create a blob from a parameter array.
Definition: LogEntryBase.php:58