class UprofilerExtension in XHProf 8
Implements support for uprofiler extension.
Hierarchy
- class \Drupal\xhprof\Extension\UprofilerExtension implements ExtensionInterface
Expanded class hierarchy of UprofilerExtension
See also
https://github.com/FriendsOfPHP/uprofiler
1 file declares its use of UprofilerExtension
- Profiler.php in src/
Profiler.php
File
- src/
Extension/ UprofilerExtension.php, line 10
Namespace
Drupal\xhprof\ExtensionView source
class UprofilerExtension implements ExtensionInterface {
/**
* {@inheritdoc}
*/
public static function isLoaded() {
return extension_loaded('uprofiler');
}
/**
* {@inheritdoc}
*/
public function getOptions() {
return [
'FLAGS_CPU' => 'UPROFILER_FLAGS_CPU',
'FLAGS_MEMORY' => 'UPROFILER_FLAGS_MEMORY',
'FLAGS_NO_BUILTINS' => 'UPROFILER_FLAGS_NO_BUILTINS',
];
}
/**
* {@inheritdoc}
*/
public function enable($modifier, $options) {
uprofiler_enable($modifier, $options);
}
/**
* {@inheritdoc}
*/
public function disable() {
return uprofiler_disable();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UprofilerExtension:: |
public | function |
Disables the extension. Overrides ExtensionInterface:: |
|
UprofilerExtension:: |
public | function |
Enables the profiling with the extension. Overrides ExtensionInterface:: |
|
UprofilerExtension:: |
public | function |
Returns the options supported by this extension. Overrides ExtensionInterface:: |
|
UprofilerExtension:: |
public static | function |
Returns TRUE if this extension is loaded into the PHP interpreter. Overrides ExtensionInterface:: |