* @todo document
* @param $article
*/
- function EditPage( $article ) {
+ function __construct( $article ) {
$this->mArticle =& $article;
$this->mTitle = $article->getTitle();
$this->action = 'submit';
* @param $exif Array: the Exif data to format ( as returned by
* Exif::getFilteredData() )
*/
- function FormatExif( $exif ) {
+ function __construct( $exif ) {
$this->mExif = $exif;
}
class DumpFileOutput extends DumpOutput {
var $handle;
- function DumpFileOutput( $file ) {
+ function __construct( $file ) {
$this->handle = fopen( $file, "wt" );
}
* @ingroup Dump
*/
class DumpPipeOutput extends DumpFileOutput {
- function DumpPipeOutput( $command, $file = null ) {
+ function __construct( $command, $file = null ) {
if( !is_null( $file ) ) {
$command .= " > " . wfEscapeShellArg( $file );
}
* @ingroup Dump
*/
class DumpGZipOutput extends DumpPipeOutput {
- function DumpGZipOutput( $file ) {
- parent::DumpPipeOutput( "gzip", $file );
+ function __construct( $file ) {
+ parent::__construct( "gzip", $file );
}
}
* @ingroup Dump
*/
class DumpBZip2Output extends DumpPipeOutput {
- function DumpBZip2Output( $file ) {
- parent::DumpPipeOutput( "bzip2", $file );
+ function __construct( $file ) {
+ parent::__construct( "bzip2", $file );
}
}
* @ingroup Dump
*/
class Dump7ZipOutput extends DumpPipeOutput {
- function Dump7ZipOutput( $file ) {
+ function __construct( $file ) {
$command = "7za a -bd -si " . wfEscapeShellArg( $file );
// Suppress annoying useless crap from p7zip
// Unfortunately this could suppress real error messages too
$command .= ' >' . wfGetNull() . ' 2>&1';
- parent::DumpPipeOutput( $command );
+ parent::__construct( $command );
}
}
* @ingroup Dump
*/
class DumpFilter {
- function DumpFilter( &$sink ) {
+ function __construct( &$sink ) {
$this->sink =& $sink;
}
var $invert = false;
var $namespaces = array();
- function DumpNamespaceFilter( &$sink, $param ) {
- parent::DumpFilter( $sink );
+ function __construct( &$sink, $param ) {
+ parent::__construct( $sink );
$constants = array(
"NS_MAIN" => NS_MAIN,
* @ingroup Dump
*/
class DumpMultiWriter {
- function DumpMultiWriter( $sinks ) {
+ function __construct( $sinks ) {
$this->sinks = $sinks;
$this->count = count( $sinks );
}
* @param $hash Strng: the content hash of the text
* @param $oldid Integer: the old_id for the CGZ object
*/
- function HistoryBlobStub( $hash = '', $oldid = 0 ) {
+ function __construct( $hash = '', $oldid = 0 ) {
$this->mHash = $hash;
}
/**
* @param $curid Integer: the cur_id pointed to
*/
- function HistoryBlobCurStub( $curid = 0 ) {
+ function __construct( $curid = 0 ) {
$this->mCurId = $curid;
}
*
* @param $str String: license name??
*/
- function License( $str ) {
+ function __construct( $str ) {
list( $text, $template ) = explode( '|', strrev( $str ), 2 );
$this->template = strrev( $template );
* @param $parserOutput ParserOutput: output from a full parse of this page
* @param $recursive Boolean: queue jobs for recursive updates?
*/
- function LinksUpdate( $title, $parserOutput, $recursive = true ) {
+ function __construct( $title, $parserOutput, $recursive = true ) {
global $wgAntiLockFlags;
if ( $wgAntiLockFlags & ALF_NO_LINK_LOCK ) {
* @param $row Mixed: either a database row or an array
* @access private
*/
- function Revision( $row ) {
+ function __construct( $row ) {
if( is_object( $row ) ) {
$this->mId = intval( $row->rev_id );
$this->mPage = intval( $row->rev_page );
* @param $file String: file which is included by execute(). It is also constructed from $name by default
* @param $includable Boolean: whether the page can be included in normal pages
*/
- function SpecialPage( $name = '', $restriction = '', $listed = true, $function = false, $file = 'default', $includable = false ) {
+ function __construct( $name = '', $restriction = '', $listed = true, $function = false, $file = 'default', $includable = false ) {
$this->mName = $name;
$this->mRestriction = $restriction;
$this->mListed = $listed;
*/
class UnlistedSpecialPage extends SpecialPage
{
- function UnlistedSpecialPage( $name, $restriction = '', $function = false, $file = 'default' ) {
- parent::SpecialPage( $name, $restriction, false, $function, $file );
+ function __construct( $name, $restriction = '', $function = false, $file = 'default' ) {
+ parent::__construct( $name, $restriction, false, $function, $file );
}
}
*/
class IncludableSpecialPage extends SpecialPage
{
- function IncludableSpecialPage( $name, $restriction = '', $listed = true, $function = false, $file = 'default' ) {
- parent::SpecialPage( $name, $restriction, $listed, $function, $file, true );
+ function __construct( $name, $restriction = '', $listed = true, $function = false, $file = 'default' ) {
+ parent::__construct( $name, $restriction, $listed, $function, $file, true );
}
}
* @see newFromSession()
* @see newFromRow()
*/
- function User() {
+ function __construct() {
$this->clearInstanceCache( 'defaults' );
}
* @param $message String: wiki message name
* @param ... parameters to pass to wfMsg()
*/
- function WikiErrorMsg( $message/*, ... */ ) {
+ function __construct( $message/*, ... */ ) {
$args = func_get_args();
array_shift( $args );
$this->mMessage = wfMsgReal( $message, $args, true );
* @param $context
* @param $offset Int
*/
- function WikiXmlError( $parser, $message = 'XML parsing error', $context = null, $offset = 0 ) {
+ function __construct( $parser, $message = 'XML parsing error', $context = null, $offset = 0 ) {
$this->mXmlError = xml_get_error_code( $parser );
$this->mColumn = xml_get_current_column_number( $parser );
$this->mLine = xml_get_current_line_number( $parser );
*
* @access private
*/
- function ZhClient($host, $port) {
+ function __construct($host, $port) {
$this->mHost = $host;
$this->mPort = $port;
$this->mConnected = $this->connect();
class DBObject {
public $mData;
- function DBObject($data) {
+ function __construct($data) {
$this->mData = $data;
}
/**
* Create a new result object from a result resource and a Database object
*/
- function ResultWrapper( $database, $result ) {
+ function __construct( $database, $result ) {
$this->db = $database;
if ( $result instanceof ResultWrapper ) {
$this->result = $result->result;
var $numeric_version = null;
var $mAffectedRows = null;
- function DatabasePostgres($server = false, $user = false, $password = false, $dbName = false,
+ function __construct($server = false, $user = false, $password = false, $dbName = false,
$failFunction = false, $flags = 0 )
{
class _DiffOp_Copy extends _DiffOp {
var $type = 'copy';
- function _DiffOp_Copy ($orig, $closing = false) {
+ function __construct ($orig, $closing = false) {
if (!is_array($closing))
$closing = $orig;
$this->orig = $orig;
class _DiffOp_Delete extends _DiffOp {
var $type = 'delete';
- function _DiffOp_Delete ($lines) {
+ function __construct ($lines) {
$this->orig = $lines;
$this->closing = false;
}
class _DiffOp_Add extends _DiffOp {
var $type = 'add';
- function _DiffOp_Add ($lines) {
+ function __construct ($lines) {
$this->closing = $lines;
$this->orig = false;
}
class _DiffOp_Change extends _DiffOp {
var $type = 'change';
- function _DiffOp_Change ($orig, $closing) {
+ function __construct ($orig, $closing) {
$this->orig = $orig;
$this->closing = $closing;
}
* (Typically these are lines from a file.)
* @param $to_lines array An array of strings.
*/
- function Diff($from_lines, $to_lines) {
+ function __construct($from_lines, $to_lines) {
$eng = new _DiffEngine;
$this->edits = $eng->diff($from_lines, $to_lines);
//$this->_check($from_lines, $to_lines);
* @param $mapped_to_lines array This array should
* have the same number of elements as $to_lines.
*/
- function MappedDiff($from_lines, $to_lines,
+ function __construct($from_lines, $to_lines,
$mapped_from_lines, $mapped_to_lines) {
wfProfileIn( __METHOD__ );
assert(sizeof($from_lines) == sizeof($mapped_from_lines));
assert(sizeof($to_lines) == sizeof($mapped_to_lines));
- $this->Diff($mapped_from_lines, $mapped_to_lines);
+ parent::__construct($mapped_from_lines, $mapped_to_lines);
$xi = $yi = 0;
for ($i = 0; $i < sizeof($this->edits); $i++) {
* @ingroup DifferenceEngine
*/
class _HWLDF_WordAccumulator {
- function _HWLDF_WordAccumulator () {
+ function __construct () {
$this->_lines = array();
$this->_line = '';
$this->_group = '';
class WordLevelDiff extends MappedDiff {
const MAX_LINE_LENGTH = 10000;
- function WordLevelDiff ($orig_lines, $closing_lines) {
+ function __construct ($orig_lines, $closing_lines) {
wfProfileIn( __METHOD__ );
list ($orig_words, $orig_stripped) = $this->_split($orig_lines);
list ($closing_words, $closing_stripped) = $this->_split($closing_lines);
- $this->MappedDiff($orig_words, $closing_words,
+ parent::__construct($orig_words, $closing_words,
$orig_stripped, $closing_stripped);
wfProfileOut( __METHOD__ );
}
* @ingroup DifferenceEngine
*/
class TableDiffFormatter extends DiffFormatter {
- function TableDiffFormatter() {
+ function __construct() {
$this->leading_context_lines = 2;
$this->trailing_context_lines = 2;
}
/**#@-*/
- function ArchivedFile( $title, $id=0, $key='' ) {
+ function __construct( $title, $id=0, $key='' ) {
$this->id = -1;
$this->title = false;
$this->name = false;
* bubble up with an error, so all return values
* from encode() should be checked with isError()
*/
- function Services_JSON($use = 0)
+ function __construct($use = 0)
{
$this->use = $use;
}
* @param $page Integer: page number, for multipage files
* @private
*/
- function ThumbnailImage( $file, $url, $width, $height, $path = false, $page = false ) {
+ function __construct( $file, $url, $width, $height, $path = false, $page = false ) {
$this->file = $file;
$this->url = $url;
# These should be integers when they get here.
/**
* @todo document
*/
- function DateFormatter() {
+ function __construct() {
global $wgContLang;
$this->monthNames = $this->getMonthRegex();
$mTOCHTML = ''; # HTML of the TOC
private $mIndexPolicy = ''; # 'index' or 'noindex'? Any other value will result in no change.
- function ParserOutput( $text = '', $languageLinks = array(), $categoryLinks = array(),
+ function __construct( $text = '', $languageLinks = array(), $categoryLinks = array(),
$containsOldMagic = false, $titletext = '' )
{
$this->mText = $text;
class SearchHighlighter {
var $mCleanWikitext = true;
- function SearchHighlighter( $cleanupWikitext = true ) {
+ function __construct( $cleanupWikitext = true ) {
$this->mCleanWikitext = $cleanupWikitext;
}
* @ingroup Search
*/
class MySQLSearchResultSet extends SqlSearchResultSet {
- function MySQLSearchResultSet( $resultSet, $terms, $totalHits=null ) {
+ function __construct( $resultSet, $terms, $totalHits=null ) {
parent::__construct( $resultSet, $terms );
$this->mTotalHits = $totalHits;
}
* @ingroup Search
*/
class SqliteSearchResultSet extends SqlSearchResultSet {
- function SqliteSearchResultSet( $resultSet, $terms, $totalHits=null ) {
+ function __construct( $resultSet, $terms, $totalHits=null ) {
parent::__construct( $resultSet, $terms );
$this->mTotalHits = $totalHits;
}
/* private */ var $mId = 0, $mNamespace, $mTitle, $mText;
/* private */ var $mTitleWords;
- function SearchUpdate( $id, $title, $text = false ) {
+ function __construct( $id, $title, $text = false ) {
$nt = Title::newFromText( $title );
if( $nt ) {
$this->mId = $id;
class FileDuplicateSearchPage extends QueryPage {
var $hash, $filename;
- function FileDuplicateSearchPage( $hash, $filename ) {
+ function __construct( $hash, $filename ) {
$this->hash = $hash;
$this->filename = $filename;
}
class MIMEsearchPage extends QueryPage {
var $major, $minor;
- function MIMEsearchPage( $major, $minor ) {
+ function __construct( $major, $minor ) {
$this->major = $major;
$this->minor = $minor;
}
* @ingroup SpecialPage
*/
class UncategorizedCategoriesPage extends UncategorizedPagesPage {
- function UncategorizedCategoriesPage() {
+ function __construct() {
$this->requestedNamespace = NS_CATEGORY;
}
* @param $request WebRequest: a WebRequest object passed by reference
* @param $par String: subpage parameter
*/
- function LoginForm( &$request, $par = '' ) {
+ function __construct( &$request, $par = '' ) {
global $wgAuth, $wgHiddenPrefs, $wgEnableEmail, $wgRedirectOnLogin;
$this->mType = ( $par == 'signup' ) ? $par : $request->getText( 'type' ); # Check for [[Special:Userlogin/signup]]
class WantedPagesPage extends WantedQueryPage {
var $nlinks;
- function WantedPagesPage( $inc = false, $nlinks = true ) {
+ function __construct( $inc = false, $nlinks = true ) {
$this->setListoutput( $inc );
$this->nlinks = $nlinks;
}
*/
class FakeConverter {
var $mLang;
- function FakeConverter( $langobj ) { $this->mLang = $langobj; }
+ function __construct( $langobj ) { $this->mLang = $langobj; }
function autoConvertToAllVariants( $text ) { return array( $this->mLang->getCode() => $text ); }
function convert( $t ) { return $t; }
function convertTitle( $t ) { return $t->getPrefixedText(); }
var $debug = false;
var $uploads = false;
- function BackupReader() {
+ function __construct() {
$this->stderr = fopen( "php://stderr", "wt" );
}
require_once( 'FiveUpgrade.inc' );
class ImageBuilder extends FiveUpgrade {
- function ImageBuilder( $dryrun = false ) {
+ function __construct( $dryrun = false ) {
parent::FiveUpgrade();
$this->maxLag = 10; # if slaves are lagged more than 10 secs, wait
var $time;
var $children;
- function profile_point( $name, $count, $time, $memory ) {
+ function __construct( $name, $count, $time, $memory ) {
$this->name = $name;
$this->count = $count;
$this->time = $time;