MediaWiki
master
ProfilerOutput.php
Go to the documentation of this file.
1
<?php
7
namespace
MediaWiki\Profiler\Output
;
8
9
use
MediaWiki\Logger\LoggerFactory
;
10
use
MediaWiki\Profiler\Profiler
;
11
use Psr\Log\LoggerInterface;
12
19
abstract
class
ProfilerOutput
{
21
protected
$collector
;
23
protected
$logger
;
25
protected
$params
;
26
31
public
function
__construct
(
Profiler
$collector
, array
$params
) {
32
$this->collector =
$collector
;
33
$this->params =
$params
;
34
$this->logger = LoggerFactory::getInstance(
'profiler'
);
35
}
36
41
public
function
canUse
() {
42
return
true
;
43
}
44
50
public
function
logsToOutput
() {
51
return
false
;
52
}
53
62
abstract
public
function
log
( array $stats );
63
}
64
66
class_alias( ProfilerOutput::class,
'ProfilerOutput'
);
MediaWiki\Logger\LoggerFactory
Create PSR-3 logger objects.
Definition
LoggerFactory.php:32
MediaWiki\Profiler\Output\ProfilerOutput
Base class for profiling output.
Definition
ProfilerOutput.php:19
MediaWiki\Profiler\Output\ProfilerOutput\logsToOutput
logsToOutput()
May the log() try to write to standard output?
Definition
ProfilerOutput.php:50
MediaWiki\Profiler\Output\ProfilerOutput\$logger
LoggerInterface $logger
Definition
ProfilerOutput.php:23
MediaWiki\Profiler\Output\ProfilerOutput\$collector
Profiler $collector
Definition
ProfilerOutput.php:21
MediaWiki\Profiler\Output\ProfilerOutput\__construct
__construct(Profiler $collector, array $params)
Definition
ProfilerOutput.php:31
MediaWiki\Profiler\Output\ProfilerOutput\canUse
canUse()
Can this output type be used?
Definition
ProfilerOutput.php:41
MediaWiki\Profiler\Output\ProfilerOutput\log
log(array $stats)
Log MediaWiki-style profiling data.
MediaWiki\Profiler\Output\ProfilerOutput\$params
array $params
Configuration of $wgProfiler.
Definition
ProfilerOutput.php:25
MediaWiki\Profiler\Profiler
Profiler base class that defines the interface and some shared functionality.
Definition
Profiler.php:25
MediaWiki\Profiler\Output
Definition
ProfilerOutput.php:7
includes
Profiler
Output
ProfilerOutput.php
Generated on Fri Apr 17 2026 08:26:20 for MediaWiki by
1.10.0