public static function AdapterFactory::getAdapter in New Relic 8
Same name and namespace in other branches
- 2.x src/ExtensionAdapter/AdapterFactory.php \Drupal\new_relic_rpm\ExtensionAdapter\AdapterFactory::getAdapter()
- 2.0.x src/ExtensionAdapter/AdapterFactory.php \Drupal\new_relic_rpm\ExtensionAdapter\AdapterFactory::getAdapter()
Returns a new relic adapter.
If the extension is not enabled, a null implementation is returned to prevent errors.
Return value
\Drupal\new_relic_rpm\ExtensionAdapter\NewRelicAdapterInterface The new relic adapter.
1 string reference to 'AdapterFactory::getAdapter'
File
- src/
ExtensionAdapter/ AdapterFactory.php, line 19
Class
- AdapterFactory
- Factory to create a New Relic adapter.
Namespace
Drupal\new_relic_rpm\ExtensionAdapterCode
public static function getAdapter() {
if (extension_loaded('newrelic')) {
return new ExtensionAdapter();
}
else {
return new NullAdapter();
}
}