Merge "Make Special:ChangeContentModel field labels consistently use colons"
[lhc/web/wiklou.git] / includes / profiler / output / ProfilerOutput.php
index ddf084e..bc14f4b 100644 (file)
@@ -31,7 +31,6 @@ abstract class ProfilerOutput {
        protected $params = [];
 
        /**
-        * Constructor
         * @param Profiler $collector The actual profiler
         * @param array $params Configuration array, passed down from $wgProfiler
         */
@@ -49,7 +48,19 @@ abstract class ProfilerOutput {
        }
 
        /**
-        * Log MediaWiki-style profiling data
+        * May the log() try to write to standard output?
+        * @return bool
+        * @since 1.33
+        */
+       public function logsToOutput() {
+               return false;
+       }
+
+       /**
+        * Log MediaWiki-style profiling data.
+        *
+        * For classes that enable logsToOutput(), this must not
+        * be called unless Profiler::setAllowOutput is enabled.
         *
         * @param array $stats Result of Profiler::getFunctionStats()
         */