MediaWiki  master
Pingback Class Reference

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

Collaboration diagram for Pingback:

Public Member Functions

 __construct (Config $config, ILoadBalancer $lb, BagOStuff $cache, HttpRequestFactory $http, LoggerInterface $logger)
 
 run ()
 Maybe send a ping. More...
 

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). More...
 
static schedulePingback ()
 Schedule a deferred callable that will check if a pingback should be sent and (if so) proceed to send it. More...
 

Protected Member Functions

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

Protected Attributes

BagOStuff $cache
 
Config $config
 
HttpRequestFactory $http
 
string $key
 updatelog key (also used as cache/db lock key) More...
 
ILoadBalancer $lb
 
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 45 of file Pingback.php.

Constructor & Destructor Documentation

◆ __construct()

Pingback::__construct ( Config  $config,
ILoadBalancer  $lb,
BagOStuff  $cache,
HttpRequestFactory  $http,
LoggerInterface  $logger 
)
Parameters
Config$config
ILoadBalancer$lb
BagOStuff$cache
HttpRequestFactory$http
LoggerInterface$logger

Definition at line 72 of file Pingback.php.

References $cache, $config, $http, $lb, $logger, and MW_VERSION.

Member Function Documentation

◆ getData()

Pingback::getData ( )
protected

Get the EventLogging packet to be sent to the server.

Exceptions
DBErrorIf identifier insert fails
Returns
array

Definition at line 170 of file Pingback.php.

◆ getSystemInfo()

static 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 191 of file Pingback.php.

Referenced by WebInstallerName\execute().

◆ run()

Pingback::run ( )

Maybe send a ping.

Exceptions
DBErrorIf identifier insert fails
DBErrorIf timestamp upsert fails

Definition at line 93 of file Pingback.php.

◆ schedulePingback()

static Pingback::schedulePingback ( )
static

Schedule a deferred callable that will check if a pingback should be sent and (if so) proceed to send it.

Definition at line 291 of file Pingback.php.

Member Data Documentation

◆ $cache

BagOStuff Pingback::$cache
protected

Definition at line 59 of file Pingback.php.

Referenced by __construct().

◆ $config

Config Pingback::$config
protected

Definition at line 55 of file Pingback.php.

Referenced by __construct().

◆ $http

HttpRequestFactory Pingback::$http
protected

Definition at line 61 of file Pingback.php.

Referenced by __construct().

◆ $key

string Pingback::$key
protected

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

Definition at line 63 of file Pingback.php.

◆ $lb

ILoadBalancer Pingback::$lb
protected

Definition at line 57 of file Pingback.php.

Referenced by __construct().

◆ $logger

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

Definition at line 53 of file Pingback.php.

Referenced by __construct().


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