Wikibase
MediaWiki Wikibase extension
|
Send information about this Wikibase instance to TODO. More...
Public Member Functions | |
__construct (Config $config=null, LoggerInterface $logger=null, ExtensionRegistry $extensionRegistry=null, SettingsArray $wikibaseRepoSettings=null, HTTPRequestFactory $requestFactory=null, LBFactory $loadBalancerFactory=null, string $key=null) | |
getSystemInfo () | |
Collect basic data about this MediaWiki installation and return it as an associative array conforming to the Pingback schema on MetaWiki (https://meta.wikimedia.org/wiki/Schema:MediaWikiPingback). More... | |
sendPingback () | |
Static Public Member Functions | |
static | schedulePingback () |
Schedule a deferred callable that will check if a pingback should be sent and (if so) proceed to send it. More... | |
static | doSchedule (WikibasePingback $instance=null) |
Public Attributes | |
const | HEARTBEAT_TIMEOUT = 60 * 60 * 24 * 30 |
Protected Attributes | |
$logger | |
$config | |
$key | |
$id | |
Private Member Functions | |
shouldSend () | |
Should a pingback be sent? More... | |
checkIfSent () | |
Has a pingback been sent in the last month for this MediaWiki version? More... | |
markSent () | |
Record the fact that we have sent a pingback for this Wikibase version, to ensure we don't submit data multiple times. More... | |
acquireLock () | |
Acquire lock for sending a pingback. More... | |
getTrackedExtensions () | |
getData () | |
Get the EventLogging packet to be sent to the server. More... | |
getOrCreatePingbackId () | |
Get a unique, stable identifier for this wiki. More... | |
postPingback (array $data) | |
Serialize pingback data and send it to MediaWiki.org via a POST to its event beacon endpoint. More... | |
Private Attributes | |
const | SCHEMA_REV = 20782637 |
const | MINIMUM_NUMBER_OF_ENTITIES = 10 |
$host | |
$extensionRegistry | |
$wikibaseRepoSettings | |
$requestFactory | |
$loadBalancerFactory | |
Send information about this Wikibase instance to TODO.
Wikibase\Repo\WikibasePingback::__construct | ( | Config | $config = null , |
LoggerInterface | $logger = null , |
||
ExtensionRegistry | $extensionRegistry = null , |
||
SettingsArray | $wikibaseRepoSettings = null , |
||
HTTPRequestFactory | $requestFactory = null , |
||
LBFactory | $loadBalancerFactory = null , |
||
string | $key = null |
||
) |
Config | null | $config | |
LoggerInterface | null | $logger | |
ExtensionRegistry | null | $extensionRegistry | |
SettingsArray | null | $wikibaseRepoSettings | |
HttpRequestFactory | null | $requestFactory | |
LBFactory | null | $loadBalancerFactory | |
string | null | $key |
|
private |
Acquire lock for sending a pingback.
This ensures only one thread can attempt to send a pingback at any given time and that we wait an hour before retrying failed attempts.
|
private |
Has a pingback been sent in the last month for this MediaWiki version?
|
static |
|
private |
Get the EventLogging packet to be sent to the server.
|
private |
Get a unique, stable identifier for this wiki.
If the identifier does not already exist, create it and save it in the database. The identifier is randomly-generated.
Wikibase\Repo\WikibasePingback::getSystemInfo | ( | ) |
Collect basic data about this MediaWiki installation and return it as an associative array conforming to the Pingback schema on MetaWiki (https://meta.wikimedia.org/wiki/Schema:MediaWikiPingback).
This is public so we can display it in the installer
Developers: If you're adding a new piece of data to this, please ensure that you update https://www.mediawiki.org/wiki/Manual:$wgPingback
|
private |
|
private |
Record the fact that we have sent a pingback for this Wikibase version, to ensure we don't submit data multiple times.
|
private |
Serialize pingback data and send it to MediaWiki.org via a POST to its event beacon endpoint.
The data encoding conforms to the expectations of EventLogging, a software suite used by the Wikimedia Foundation for logging and processing analytic data.
Compare: <https://github.com/wikimedia/mediawiki-extensions-EventLogging/ blob/7e5fe4f1ef/includes/EventLogging.php#L32-L74>
array | $data | Pingback data as an associative array |
|
static |
Schedule a deferred callable that will check if a pingback should be sent and (if so) proceed to send it.
Wikibase\Repo\WikibasePingback::sendPingback | ( | ) |
|
private |
Should a pingback be sent?
|
protected |
|
private |
|
private |
|
protected |
|
protected |
|
private |
|
protected |
|
private |
|
private |
const Wikibase\Repo\WikibasePingback::HEARTBEAT_TIMEOUT = 60 * 60 * 24 * 30 |
|
private |
|
private |