MediaWiki master
HistoryBlobCurStub.php
Go to the documentation of this file.
1<?php
10
18 public $mCurId;
19
23 public function __construct( $curid = 0 ) {
24 $this->mCurId = $curid;
25 }
26
33 public function setLocation( $id ) {
34 $this->mCurId = $id;
35 }
36
40 public function getText() {
41 $dbr = MediaWikiServices::getInstance()->getConnectionProvider()->getReplicaDatabase();
42 return $dbr->newSelectQueryBuilder()
43 ->select( 'cur_text' )
44 ->from( 'cur' )
45 ->where( [ 'cur_id' => $this->mCurId ] )
46 ->caller( __METHOD__ )
47 ->fetchField();
48 }
49}
50
51// Blobs generated by MediaWiki < 1.5 on PHP 4 were serialized with the
52// class name coerced to lowercase. We can improve efficiency by adding
53// autoload entries for the lowercase variants of these classes (T166759).
54// The code below is never executed, but it is picked up by the AutoloadGenerator
55// parser, which scans for class_alias() calls.
56/*
57class_alias( HistoryBlobCurStub::class, 'historyblobcurstub' );
58*/
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.