* a different Title instance set on it.
* @since 1.19
*/
-class DerivativeContext extends ContextSource {
+class DerivativeContext extends ContextSource implements MutableContext {
/**
* @var WebRequest
*/
*/
private $config;
+ /**
+ * @var Stats
+ */
+ private $stats;
+
/**
* Constructor
* @param IContextSource $context Context to inherit from
}
}
+ /**
+ * Get the stats object
+ *
+ * @return BufferingStatsdDataFactory
+ */
+ public function getStats() {
+ if ( !is_null( $this->stats ) ) {
+ return $this->stats;
+ } else {
+ return $this->getContext()->getStats();
+ }
+ }
+
/**
* Set the WebRequest object
*