Send information about this Wikibase instance to TODO.
More...
|
| shouldSend () |
| Should a pingback be sent?
|
|
| checkIfSent () |
| Has a pingback been sent in the last month for this MediaWiki version?
|
|
| markSent () |
| Record the fact that we have sent a pingback for this Wikibase version, to ensure we don't submit data multiple times.
|
|
| acquireLock () |
| Acquire lock for sending a pingback.
|
|
| getTrackedExtensions () |
|
| getData () |
| Get the EventLogging packet to be sent to the server.
|
|
| getOrCreatePingbackId () |
| Get a unique, stable identifier for this wiki.
|
|
| postPingback (array $data) |
| Serialize pingback data and send it to MediaWiki.org via a POST to its event beacon endpoint.
|
|
Send information about this Wikibase instance to TODO.
- Copyright
- GPL-2.0-or-later
- See also
- Pingback
◆ __construct()
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 |
|
) |
| |
- Parameters
-
Config | null | $config | |
LoggerInterface | null | $logger | |
ExtensionRegistry | null | $extensionRegistry | |
SettingsArray | null | $wikibaseRepoSettings | |
HttpRequestFactory | null | $requestFactory | |
LBFactory | null | $loadBalancerFactory | |
string | null | $key | |
◆ acquireLock()
Wikibase\Repo\WikibasePingback::acquireLock |
( |
| ) |
|
|
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.
- Returns
- bool Whether lock was acquired
◆ checkIfSent()
Wikibase\Repo\WikibasePingback::checkIfSent |
( |
| ) |
|
|
private |
Has a pingback been sent in the last month for this MediaWiki version?
- Returns
- bool
◆ doSchedule()
static Wikibase\Repo\WikibasePingback::doSchedule |
( |
WikibasePingback |
$instance = null | ) |
|
|
static |
◆ getData()
Wikibase\Repo\WikibasePingback::getData |
( |
| ) |
|
|
private |
Get the EventLogging packet to be sent to the server.
- Returns
- array
◆ getOrCreatePingbackId()
Wikibase\Repo\WikibasePingback::getOrCreatePingbackId |
( |
| ) |
|
|
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.
- Returns
- string 32-character hex string
◆ getSystemInfo()
Wikibase\Repo\WikibasePingback::getSystemInfo |
( |
| ) |
|
◆ getTrackedExtensions()
Wikibase\Repo\WikibasePingback::getTrackedExtensions |
( |
| ) |
|
|
private |
◆ markSent()
Wikibase\Repo\WikibasePingback::markSent |
( |
| ) |
|
|
private |
Record the fact that we have sent a pingback for this Wikibase version, to ensure we don't submit data multiple times.
- Returns
- bool
◆ postPingback()
Wikibase\Repo\WikibasePingback::postPingback |
( |
array |
$data | ) |
|
|
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>
- Parameters
-
array | $data | Pingback data as an associative array |
- Returns
- bool true on success, false on failure
◆ schedulePingback()
static Wikibase\Repo\WikibasePingback::schedulePingback |
( |
| ) |
|
|
static |
Schedule a deferred callable that will check if a pingback should be sent and (if so) proceed to send it.
◆ sendPingback()
Wikibase\Repo\WikibasePingback::sendPingback |
( |
| ) |
|
◆ shouldSend()
Wikibase\Repo\WikibasePingback::shouldSend |
( |
| ) |
|
|
private |
Should a pingback be sent?
- Returns
- bool
◆ $config
Wikibase\Repo\WikibasePingback::$config |
|
protected |
◆ $extensionRegistry
Wikibase\Repo\WikibasePingback::$extensionRegistry |
|
private |
◆ $host
Wikibase\Repo\WikibasePingback::$host |
|
private |
◆ $id
Wikibase\Repo\WikibasePingback::$id |
|
protected |
◆ $key
Wikibase\Repo\WikibasePingback::$key |
|
protected |
◆ $loadBalancerFactory
Wikibase\Repo\WikibasePingback::$loadBalancerFactory |
|
private |
◆ $logger
Wikibase\Repo\WikibasePingback::$logger |
|
protected |
◆ $requestFactory
Wikibase\Repo\WikibasePingback::$requestFactory |
|
private |
◆ $wikibaseRepoSettings
Wikibase\Repo\WikibasePingback::$wikibaseRepoSettings |
|
private |
◆ HEARBEAT_TIMEOUT
const Wikibase\Repo\WikibasePingback::HEARBEAT_TIMEOUT = 60 * 60 * 24 * 30 |
◆ MINIMUM_NUMBER_OF_ENTITIES
const Wikibase\Repo\WikibasePingback::MINIMUM_NUMBER_OF_ENTITIES = 10 |
|
private |
◆ SCHEMA_REV
const Wikibase\Repo\WikibasePingback::SCHEMA_REV = 20782637 |
|
private |
The documentation for this class was generated from the following file: