dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stats: Hard-deprecate BufferingStatsdDataFactory::getBuffer()
[lhc/web/wiklou.git]
/
includes
/
libs
/
stats
/
BufferingStatsdDataFactory.php
diff --git
a/includes/libs/stats/BufferingStatsdDataFactory.php
b/includes/libs/stats/BufferingStatsdDataFactory.php
index
d75d9c0
..
5ef0135
100644
(file)
--- a/
includes/libs/stats/BufferingStatsdDataFactory.php
+++ b/
includes/libs/stats/BufferingStatsdDataFactory.php
@@
-92,34
+92,34
@@
class BufferingStatsdDataFactory extends StatsdDataFactory implements IBuffering
}
/**
}
/**
- * @deprecated
Use getData()
+ * @deprecated
since 1.30 Use getData() instead
* @return StatsdData[]
*/
public function getBuffer() {
* @return StatsdData[]
*/
public function getBuffer() {
+ wfDeprecated( __METHOD__, '1.30' );
return $this->buffer;
}
return $this->buffer;
}
- /**
- * Check whether this data factory has any data.
- * @return bool
- */
public function hasData() {
return !empty( $this->buffer );
}
/**
public function hasData() {
return !empty( $this->buffer );
}
/**
- *
Return data from the factory.
+ *
@since 1.30
* @return StatsdData[]
*/
public function getData() {
return $this->buffer;
}
* @return StatsdData[]
*/
public function getData() {
return $this->buffer;
}
- /**
- * Set collection enable status.
- * @param bool $enabled Will collection be enabled?
- * @return void
- */
+ public function clearData() {
+ $this->buffer = [];
+ }
+
+ public function getDataCount() {
+ return count( $this->buffer );
+ }
+
public function setEnabled( $enabled ) {
$this->enabled = $enabled;
}
public function setEnabled( $enabled ) {
$this->enabled = $enabled;
}