MediaWiki master
MediaWiki\Installer\Pingback Class Reference

Send information about this MediaWiki instance to mediawiki.org. More...

Collaboration diagram for MediaWiki\Installer\Pingback:

Public Member Functions

 __construct (Config $config, IConnectionProvider $dbProvider, BagOStuff $cache, HttpRequestFactory $http, LoggerInterface $logger)
 
 run ()
 Maybe send a ping.
 

Static Public Member Functions

static getSystemInfo (Config $config)
 Collect basic data about this MediaWiki installation and return it as an associative array conforming to the Pingback schema on Meta-Wiki (https://meta.wikimedia.org/wiki/Schema:MediaWikiPingback).
 

Protected Member Functions

 getData ()
 Get the EventLogging packet to be sent to the server.
 

Protected Attributes

BagOStuff $cache
 
Config $config
 
IConnectionProvider $dbProvider
 
HttpRequestFactory $http
 
string $key
 updatelog key (also used as cache/db lock key)
 
LoggerInterface $logger
 

Detailed Description

Send information about this MediaWiki instance to mediawiki.org.

This service uses two kinds of rows in the update_log database table:

  • ul_key PingBack, this holds a random identifier for this wiki, created only once, when the first ping after wiki creation is sent.
  • ul_key Pingback-<MW_VERSION>, this holds a timestamp and is created once after each MediaWiki upgrade, and then updated up to once a month.
Access: internal
For use by Setup.php only
Since
1.28

Definition at line 47 of file Pingback.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Installer\Pingback::__construct ( Config  $config,
IConnectionProvider  $dbProvider,
BagOStuff  $cache,
HttpRequestFactory  $http,
LoggerInterface  $logger 
)
Parameters
Config$config
IConnectionProvider$dbProvider
BagOStuff$cache
HttpRequestFactory$http
LoggerInterface$logger

Definition at line 74 of file Pingback.php.

References MediaWiki\Installer\Pingback\$cache, MediaWiki\Installer\Pingback\$config, MediaWiki\Installer\Pingback\$dbProvider, MediaWiki\Installer\Pingback\$http, MediaWiki\Installer\Pingback\$logger, and MW_VERSION.

Member Function Documentation

◆ getData()

MediaWiki\Installer\Pingback::getData ( )
protected

Get the EventLogging packet to be sent to the server.

Exceptions
DBErrorIf identifier insert fails
Returns
array

Definition at line 180 of file Pingback.php.

◆ getSystemInfo()

static MediaWiki\Installer\Pingback::getSystemInfo ( Config  $config)
static

Collect basic data about this MediaWiki installation and return it as an associative array conforming to the Pingback schema on Meta-Wiki (https://meta.wikimedia.org/wiki/Schema:MediaWikiPingback).

Developers: If you're adding a new piece of data to this, please document this data at https://www.mediawiki.org/wiki/Manual:$wgPingback.

Access: internal
For use by Installer only to display which data we send.
Parameters
Config$configWith DBtype set.
Returns
array

Definition at line 201 of file Pingback.php.

Referenced by MediaWiki\Installer\WebInstallerName\execute().

◆ run()

MediaWiki\Installer\Pingback::run ( )

Maybe send a ping.

Exceptions
DBErrorIf identifier insert fails
DBErrorIf timestamp upsert fails

Definition at line 95 of file Pingback.php.

Member Data Documentation

◆ $cache

BagOStuff MediaWiki\Installer\Pingback::$cache
protected

Definition at line 61 of file Pingback.php.

Referenced by MediaWiki\Installer\Pingback\__construct().

◆ $config

Config MediaWiki\Installer\Pingback::$config
protected

Definition at line 57 of file Pingback.php.

Referenced by MediaWiki\Installer\Pingback\__construct().

◆ $dbProvider

IConnectionProvider MediaWiki\Installer\Pingback::$dbProvider
protected

Definition at line 59 of file Pingback.php.

Referenced by MediaWiki\Installer\Pingback\__construct().

◆ $http

HttpRequestFactory MediaWiki\Installer\Pingback::$http
protected

Definition at line 63 of file Pingback.php.

Referenced by MediaWiki\Installer\Pingback\__construct().

◆ $key

string MediaWiki\Installer\Pingback::$key
protected

updatelog key (also used as cache/db lock key)

Definition at line 65 of file Pingback.php.

◆ $logger

LoggerInterface MediaWiki\Installer\Pingback::$logger
protected
Initial value:
=
private const SCHEMA_REV 20104427

Definition at line 55 of file Pingback.php.

Referenced by MediaWiki\Installer\Pingback\__construct().


The documentation for this class was generated from the following file: