MediaWiki
REL1_39
SectionProfileCallback.php
Go to the documentation of this file.
1
<?php
20
use Wikimedia\ScopedCallback;
21
28
class
SectionProfileCallback
extends
ScopedCallback {
30
protected
$profiler
;
32
protected
$section
;
33
38
public
function
__construct
(
SectionProfiler
$profiler
,
$section
) {
39
parent::__construct(
null
);
40
$this->profiler =
$profiler
;
41
$this->section =
$section
;
42
}
43
44
public
function
__destruct
() {
45
$this->profiler->profileOutInternal( $this->section );
46
}
47
}
SectionProfileCallback
Subclass ScopedCallback to avoid call_user_func_array(), which is slow.
Definition
SectionProfileCallback.php:28
SectionProfileCallback\$section
string $section
Definition
SectionProfileCallback.php:32
SectionProfileCallback\__construct
__construct(SectionProfiler $profiler, $section)
Definition
SectionProfileCallback.php:38
SectionProfileCallback\__destruct
__destruct()
Definition
SectionProfileCallback.php:44
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 Mon Dec 23 2024 06:24:16 for MediaWiki by
1.10.0