MediaWiki  1.34.0
HistoryBlob Interface Reference

Base class for general text storage via the "object" flag in old_flags, or two-part external storage URLs. More...

Inheritance diagram for HistoryBlob:

Public Member Functions

 addItem ( $text)
 Adds an item of text, returns a stub object which points to the item. More...
 
 getItem ( $key)
 Get item by key, or false if the key is not present. More...
 
 getText ()
 Get default text. More...
 
 setText ( $text)
 Set the "default text" This concept is an odd property of the current DB schema, whereby each text item has a revision associated with it. More...
 

Detailed Description

Base class for general text storage via the "object" flag in old_flags, or two-part external storage URLs.

Used for represent efficient concatenated storage, and migration-related pointer objects.

Definition at line 28 of file HistoryBlob.php.

Member Function Documentation

◆ addItem()

HistoryBlob::addItem (   $text)

Adds an item of text, returns a stub object which points to the item.

You must call setLocation() on the stub object before storing it to the database

Parameters
string$text
Returns
string The key for getItem()

Implemented in DiffHistoryBlob, and ConcatenatedGzipHistoryBlob.

◆ getItem()

HistoryBlob::getItem (   $key)

Get item by key, or false if the key is not present.

Parameters
string$key
Returns
string|bool

Implemented in DiffHistoryBlob, and ConcatenatedGzipHistoryBlob.

◆ getText()

HistoryBlob::getText ( )

Get default text.

This is called from Revision::getRevisionText()

Returns
string

Implemented in DiffHistoryBlob, and ConcatenatedGzipHistoryBlob.

◆ setText()

HistoryBlob::setText (   $text)

Set the "default text" This concept is an odd property of the current DB schema, whereby each text item has a revision associated with it.

The default text is the text of the associated revision. There may, however, be other revisions in the same object.

Default text is not required for two-part external storage URLs.

Parameters
string$text

Implemented in DiffHistoryBlob, and ConcatenatedGzipHistoryBlob.


The documentation for this interface was generated from the following file: