public function NewRelicRequestSubscriber::__construct in New Relic 8
Same name and namespace in other branches
- 2.x src/EventSubscriber/NewRelicRequestSubscriber.php \Drupal\new_relic_rpm\EventSubscriber\NewRelicRequestSubscriber::__construct()
- 2.0.x src/EventSubscriber/NewRelicRequestSubscriber.php \Drupal\new_relic_rpm\EventSubscriber\NewRelicRequestSubscriber::__construct()
Constructs a subscriber.
Parameters
\Drupal\new_relic_rpm\ExtensionAdapter\NewRelicAdapterInterface $adapter: The Adapter that we use to talk to the New Relic extension.
\Drupal\Core\Path\PathMatcherInterface $path_matcher: The object we use for matching paths.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The object we use to get our settings.
\Drupal\Core\Path\CurrentPathStack $current_path_stack: An object representing the current URL path of the request.
\Drupal\Core\Session\AccountInterface $current_user: An object representing the current user.
File
- src/
EventSubscriber/ NewRelicRequestSubscriber.php, line 76
Class
- NewRelicRequestSubscriber
- Request event listener to set transaction name and flag ignore/background.
Namespace
Drupal\new_relic_rpm\EventSubscriberCode
public function __construct(NewRelicAdapterInterface $adapter, PathMatcherInterface $path_matcher, ConfigFactoryInterface $config_factory, CurrentPathStack $current_path_stack, AccountInterface $current_user) {
$this->adapter = $adapter;
$this->pathMatcher = $path_matcher;
$this->config = $config_factory
->get('new_relic_rpm.settings');
$this->currentPathStack = $current_path_stack;
$this->currentUser = $current_user;
}