MediaWiki REL1_27
SectionProfileCallback Class Reference

Subclass ScopedCallback to avoid call_user_func_array(), which is slow. More...

Inheritance diagram for SectionProfileCallback:
Collaboration diagram for SectionProfileCallback:

Public Member Functions

 __construct (SectionProfiler $profiler, $section)
 
 __destruct ()
 Trigger the callback when this leaves scope.
 
- Public Member Functions inherited from ScopedCallback
 __construct ( $callback, array $params=[])
 

Protected Attributes

SectionProfiler $profiler
 
string $section
 
- Protected Attributes inherited from ScopedCallback
callable $callback
 
array $params
 

Additional Inherited Members

- Static Public Member Functions inherited from ScopedCallback
static cancel (ScopedCallback &$sc=null)
 Destroy a scoped callback without triggering it.
 
static consume (ScopedCallback &$sc=null)
 Trigger a scoped callback and destroy it.
 

Detailed Description

Subclass ScopedCallback to avoid call_user_func_array(), which is slow.

This class should not be used outside of SectionProfiler

Definition at line 510 of file SectionProfiler.php.

Constructor & Destructor Documentation

◆ __construct()

SectionProfileCallback::__construct ( SectionProfiler  $profiler,
  $section 
)
Parameters
SectionProfiler$profiler
string$section

Definition at line 520 of file SectionProfiler.php.

References $profiler, and $section.

◆ __destruct()

SectionProfileCallback::__destruct ( )

Trigger the callback when this leaves scope.

Reimplemented from ScopedCallback.

Definition at line 526 of file SectionProfiler.php.

Member Data Documentation

◆ $profiler

SectionProfiler SectionProfileCallback::$profiler
protected

Definition at line 512 of file SectionProfiler.php.

Referenced by __construct().

◆ $section

string SectionProfileCallback::$section
protected

Definition at line 514 of file SectionProfiler.php.

Referenced by __construct().


The documentation for this class was generated from the following file: