MediaWiki
REL1_34
SectionProfileCallback.php
Go to the documentation of this file.
1
<?php
21
use Wikimedia\ScopedCallback;
22
29
class
SectionProfileCallback
extends
ScopedCallback {
31
protected
$profiler
;
33
protected
$section
;
34
39
public
function
__construct
(
SectionProfiler
$profiler
,
$section
) {
40
parent::__construct(
null
);
41
$this->profiler =
$profiler
;
42
$this->section =
$section
;
43
}
44
45
function
__destruct
() {
46
$this->profiler->profileOutInternal( $this->section );
47
}
48
}
SectionProfileCallback
Subclass ScopedCallback to avoid call_user_func_array(), which is slow.
Definition
SectionProfileCallback.php:29
SectionProfileCallback\$section
string $section
Definition
SectionProfileCallback.php:33
SectionProfileCallback\__construct
__construct(SectionProfiler $profiler, $section)
Definition
SectionProfileCallback.php:39
SectionProfileCallback\__destruct
__destruct()
Definition
SectionProfileCallback.php:45
SectionProfileCallback\$profiler
SectionProfiler $profiler
Definition
SectionProfileCallback.php:31
SectionProfiler
Custom PHP profiler for parser/DB type section names that xhprof/xdebug can't handle.
Definition
SectionProfiler.php:30
includes
profiler
SectionProfileCallback.php
Generated on Mon Nov 25 2024 16:05:36 for MediaWiki by
1.10.0