]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/libs/stats/IBufferingStatsdDataFactory.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / includes / libs / stats / IBufferingStatsdDataFactory.php
diff --git a/includes/libs/stats/IBufferingStatsdDataFactory.php b/includes/libs/stats/IBufferingStatsdDataFactory.php
new file mode 100644 (file)
index 0000000..f77b26c
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+use Liuggio\StatsdClient\Entity\StatsdData;
+use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
+
+/**
+ * MediaWiki adaptation of StatsdDataFactory that provides buffering functionality.
+ *
+ * @see BufferingStatsdDataFactory
+ */
+interface IBufferingStatsdDataFactory extends StatsdDataFactoryInterface {
+       /**
+        * Check whether this data factory has any data.
+        * @return bool
+        */
+       public function hasData();
+
+       /**
+        * Return data from the factory.
+        * @return StatsdData[]
+        */
+       public function getData();
+
+       /**
+        * Set collection enable status.
+        * @param bool $enabled Will collection be enabled?
+        * @return void
+        */
+       public function setEnabled( $enabled );
+
+}