MediaWiki master
HistoryBlobCurStub.php
Go to the documentation of this file.
1<?php
9// NO_NAMESPACE Compatibility with serialized objects in permanent storage
10
12
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/*
59class_alias( HistoryBlobCurStub::class, 'historyblobcurstub' );
60*/
To speed up conversion from 1.4 to 1.5 schema, text rows can refer to the leftover cur table as the b...
setLocation( $id)
Sets the location (cur_id) of the main object to which this object points.
Service locator for MediaWiki core services.