MediaWiki
master
SectionProfileCallback.php
Go to the documentation of this file.
1
<?php
6
use Wikimedia\ScopedCallback;
7
14
class
SectionProfileCallback
extends
ScopedCallback {
15
16
protected
SectionProfiler
$profiler
;
17
protected
string
$section
;
18
19
public
function
__construct
(
SectionProfiler
$profiler
,
string
$section
) {
20
parent::__construct(
null
);
21
$this->profiler =
$profiler
;
22
$this->section =
$section
;
23
}
24
25
public
function
__destruct
() {
26
$this->profiler->profileOutInternal( $this->section );
27
}
28
}
SectionProfileCallback
Subclass ScopedCallback to avoid call_user_func_array(), which is slow.
Definition
SectionProfileCallback.php:14
SectionProfileCallback\$section
string $section
Definition
SectionProfileCallback.php:17
SectionProfileCallback\__destruct
__destruct()
Definition
SectionProfileCallback.php:25
SectionProfileCallback\__construct
__construct(SectionProfiler $profiler, string $section)
Definition
SectionProfileCallback.php:19
SectionProfileCallback\$profiler
SectionProfiler $profiler
Definition
SectionProfileCallback.php:16
SectionProfiler
Arbitrary section name based PHP profiling.
Definition
SectionProfiler.php:20
includes
Profiler
SectionProfileCallback.php
Generated on Wed Jan 14 2026 23:26:30 for MediaWiki by
1.10.0