Introduce StatsdAwareInterface
authoraddshore <addshorewiki@gmail.com>
Sat, 2 Apr 2016 09:24:59 +0000 (12:24 +0300)
committerReedy <reedy@wikimedia.org>
Sat, 2 Apr 2016 13:29:51 +0000 (13:29 +0000)
Change-Id: Iac343e4b448d9af852b4c479c35a9ff60359b6d5

autoload.php
includes/WatchedItemStore.php
includes/libs/stats/StatsdAwareInterface.php [new file with mode: 0644]

index df38b3a..0ecca6f 100644 (file)
@@ -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',
index 2aa294b..8ae7932 100644 (file)
@@ -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 (file)
index 0000000..5151b26
--- /dev/null
@@ -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 );
+
+}