MediaWiki 1.41.2
HistoryBlobCurStub.php
Go to the documentation of this file.
1<?php
30 public $mCurId;
31
35 public function __construct( $curid = 0 ) {
36 $this->mCurId = $curid;
37 }
38
45 public function setLocation( $id ) {
46 $this->mCurId = $id;
47 }
48
52 public function getText() {
53 $dbr = wfGetDB( DB_REPLICA );
54 $row = $dbr->newSelectQueryBuilder()
55 ->select( [ 'cur_text' ] )
56 ->from( 'cur' )
57 ->where( [ 'cur_id' => $this->mCurId ] )
58 ->caller( __METHOD__ )->fetchRow();
59 return $row ? $row->cur_text : false;
60 }
61}
62
63// Blobs generated by MediaWiki < 1.5 on PHP 4 were serialized with the
64// class name coerced to lowercase. We can improve efficiency by adding
65// autoload entries for the lowercase variants of these classes (T166759).
66// The code below is never executed, but it is picked up by the AutoloadGenerator
67// parser, which scans for class_alias() calls.
68/*
69class_alias( HistoryBlobCurStub::class, 'historyblobcurstub' );
70*/
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
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.
const DB_REPLICA
Definition defines.php:26