diff options
-rw-r--r-- | autoload.php | 1 | ||||
-rw-r--r-- | includes/WatchedItemStore.php | 2 | ||||
-rw-r--r-- | includes/libs/stats/StatsdAwareInterface.php | 21 |
3 files changed, 23 insertions, 1 deletions
diff --git a/autoload.php b/autoload.php index df38b3a2a2c1..0ecca6f4a122 100644 --- a/autoload.php +++ b/autoload.php @@ -1267,6 +1267,7 @@ $wgAutoloadLocalClasses = [ 'SquidPurgeClientPool' => __DIR__ . '/includes/clientpool/SquidPurgeClientPool.php', 'SquidUpdate' => __DIR__ . '/includes/deferred/CdnCacheUpdate.php', 'SrConverter' => __DIR__ . '/languages/classes/LanguageSr.php', + 'StatsdAwareInterface' => __DIR__ . '/includes/libs/stats/StatsdAwareInterface.php', 'StatsOutput' => __DIR__ . '/maintenance/language/StatOutputs.php', 'Status' => __DIR__ . '/includes/Status.php', 'StatusValue' => __DIR__ . '/includes/libs/StatusValue.php', diff --git a/includes/WatchedItemStore.php b/includes/WatchedItemStore.php index 2aa294b6393a..8ae7932be0b4 100644 --- a/includes/WatchedItemStore.php +++ b/includes/WatchedItemStore.php @@ -11,7 +11,7 @@ use Wikimedia\Assert\Assert; * * @since 1.27 */ -class WatchedItemStore { +class WatchedItemStore implements StatsdAwareInterface { const SORT_DESC = 'DESC'; const SORT_ASC = 'ASC'; diff --git a/includes/libs/stats/StatsdAwareInterface.php b/includes/libs/stats/StatsdAwareInterface.php new file mode 100644 index 000000000000..5151b2689a68 --- /dev/null +++ b/includes/libs/stats/StatsdAwareInterface.php @@ -0,0 +1,21 @@ +<?php + +use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface; + +/** + * Describes a Statsd aware interface + * + * @since 1.27 + * @author Addshore + */ +interface StatsdAwareInterface { + + /** + * Sets a logger instance on the object + * + * @param StatsdDataFactoryInterface $statsFactory + * @return null + */ + public function setStatsdDataFactory( StatsdDataFactoryInterface $statsFactory ); + +} |