MediaWiki  1.34.0
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 
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\$profiler
SectionProfiler $profiler
Definition: SectionProfileCallback.php:31
SectionProfileCallback\__construct
__construct(SectionProfiler $profiler, $section)
Definition: SectionProfileCallback.php:39
SectionProfileCallback\$section
string $section
Definition: SectionProfileCallback.php:33
SectionProfileCallback
Subclass ScopedCallback to avoid call_user_func_array(), which is slow.
Definition: SectionProfileCallback.php:29
SectionProfiler
Custom PHP profiler for parser/DB type section names that xhprof/xdebug can't handle.
Definition: SectionProfiler.php:30
SectionProfileCallback\__destruct
__destruct()
Definition: SectionProfileCallback.php:45