MediaWiki
master
HistoryBlobCurStub.php
Go to the documentation of this file.
1
<?php
9
// NO_NAMESPACE Compatibility with serialized objects in permanent storage
10
11
use
MediaWiki\MediaWikiServices
;
12
18
class
HistoryBlobCurStub
{
20
public
$mCurId
;
21
25
public
function
__construct
( $curid = 0 ) {
26
$this->mCurId = $curid;
27
}
28
35
public
function
setLocation
( $id ) {
36
$this->mCurId = $id;
37
}
38
42
public
function
getText
() {
43
$dbr = MediaWikiServices::getInstance()->getConnectionProvider()->getReplicaDatabase();
44
return
$dbr->newSelectQueryBuilder()
45
->select(
'cur_text'
)
46
->from(
'cur'
)
47
->where( [
'cur_id'
=> $this->mCurId ] )
48
->caller( __METHOD__ )
49
->fetchField();
50
}
51
}
52
53
// Blobs generated by MediaWiki < 1.5 on PHP 4 were serialized with the
54
// class name coerced to lowercase. We can improve efficiency by adding
55
// autoload entries for the lowercase variants of these classes (T166759).
56
// The code below is never executed, but it is picked up by the AutoloadGenerator
57
// parser, which scans for class_alias() calls.
58
/*
59
class_alias( HistoryBlobCurStub::class, 'historyblobcurstub' );
60
*/
HistoryBlobCurStub
To speed up conversion from 1.4 to 1.5 schema, text rows can refer to the leftover cur table as the b...
Definition
HistoryBlobCurStub.php:18
HistoryBlobCurStub\$mCurId
int $mCurId
Definition
HistoryBlobCurStub.php:20
HistoryBlobCurStub\setLocation
setLocation( $id)
Sets the location (cur_id) of the main object to which this object points.
Definition
HistoryBlobCurStub.php:35
HistoryBlobCurStub\__construct
__construct( $curid=0)
Definition
HistoryBlobCurStub.php:25
HistoryBlobCurStub\getText
getText()
Definition
HistoryBlobCurStub.php:42
MediaWiki\MediaWikiServices
Service locator for MediaWiki core services.
Definition
MediaWikiServices.php:272
includes
HistoryBlob
HistoryBlobCurStub.php
Generated on Fri Aug 7 2026 17:25:28 for MediaWiki by
1.10.0