MediaWiki
master
HistoryBlobCurStub.php
Go to the documentation of this file.
1
<?php
23
use
MediaWiki\MediaWikiServices
;
24
30
class
HistoryBlobCurStub
{
32
public
$mCurId
;
33
37
public
function
__construct
( $curid = 0 ) {
38
$this->mCurId = $curid;
39
}
40
47
public
function
setLocation
( $id ) {
48
$this->mCurId = $id;
49
}
50
54
public
function
getText
() {
55
$dbr = MediaWikiServices::getInstance()->getConnectionProvider()->getReplicaDatabase();
56
$row = $dbr->newSelectQueryBuilder()
57
->select( [
'cur_text'
] )
58
->from(
'cur'
)
59
->where( [
'cur_id'
=> $this->mCurId ] )
60
->caller( __METHOD__ )->fetchRow();
61
return
$row ? $row->cur_text :
false
;
62
}
63
}
64
65
// Blobs generated by MediaWiki < 1.5 on PHP 4 were serialized with the
66
// class name coerced to lowercase. We can improve efficiency by adding
67
// autoload entries for the lowercase variants of these classes (T166759).
68
// The code below is never executed, but it is picked up by the AutoloadGenerator
69
// parser, which scans for class_alias() calls.
70
/*
71
class_alias( HistoryBlobCurStub::class, 'historyblobcurstub' );
72
*/
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:30
HistoryBlobCurStub\$mCurId
int $mCurId
Definition
HistoryBlobCurStub.php:32
HistoryBlobCurStub\setLocation
setLocation( $id)
Sets the location (cur_id) of the main object to which this object points.
Definition
HistoryBlobCurStub.php:47
HistoryBlobCurStub\__construct
__construct( $curid=0)
Definition
HistoryBlobCurStub.php:37
HistoryBlobCurStub\getText
getText()
Definition
HistoryBlobCurStub.php:54
MediaWiki\MediaWikiServices
Service locator for MediaWiki core services.
Definition
MediaWikiServices.php:240
includes
historyblob
HistoryBlobCurStub.php
Generated on Wed May 1 2024 21:23:23 for MediaWiki by
1.10.0