MediaWiki REL1_39
ProfilerOutput.php
Go to the documentation of this file.
1<?php
22use Psr\Log\LoggerInterface;
23
30abstract class ProfilerOutput {
32 protected $collector;
34 protected $logger;
36 protected $params;
37
42 public function __construct( Profiler $collector, array $params ) {
43 $this->collector = $collector;
44 $this->params = $params;
45 $this->logger = LoggerFactory::getInstance( 'profiler' );
46 }
47
52 public function canUse() {
53 return true;
54 }
55
61 public function logsToOutput() {
62 return false;
63 }
64
73 abstract public function log( array $stats );
74}
PSR-3 logger instance factory.
Base class for profiling output.
canUse()
Can this output type be used?
array $params
Configuration of $wgProfiler.
log(array $stats)
Log MediaWiki-style profiling data.
logsToOutput()
May the log() try to write to standard output?
LoggerInterface $logger
__construct(Profiler $collector, array $params)
Profiler base class that defines the interface and some shared functionality.
Definition Profiler.php:36