MediaWiki
master
SectionProfileCallback.php
Go to the documentation of this file.
1
<?php
20
use Wikimedia\ScopedCallback;
21
28
class
SectionProfileCallback
extends
ScopedCallback {
29
30
protected
SectionProfiler
$profiler
;
31
protected
string
$section
;
32
37
public
function
__construct
(
SectionProfiler
$profiler
,
string
$section
) {
38
parent::__construct(
null
);
39
$this->profiler =
$profiler
;
40
$this->section =
$section
;
41
}
42
43
public
function
__destruct
() {
44
$this->profiler->profileOutInternal( $this->section );
45
}
46
}
SectionProfileCallback
Subclass ScopedCallback to avoid call_user_func_array(), which is slow.
Definition
SectionProfileCallback.php:28
SectionProfileCallback\$section
string $section
Definition
SectionProfileCallback.php:31
SectionProfileCallback\__destruct
__destruct()
Definition
SectionProfileCallback.php:43
SectionProfileCallback\__construct
__construct(SectionProfiler $profiler, string $section)
Definition
SectionProfileCallback.php:37
SectionProfileCallback\$profiler
SectionProfiler $profiler
Definition
SectionProfileCallback.php:30
SectionProfiler
Arbitrary section name based PHP profiling.
Definition
SectionProfiler.php:35
includes
profiler
SectionProfileCallback.php
Generated on Thu Oct 3 2024 11:24:37 for MediaWiki by
1.10.0