You are here

public function NewRelicRequestSubscriber::__construct in New Relic 2.x

Same name and namespace in other branches
  1. 8 src/EventSubscriber/NewRelicRequestSubscriber.php \Drupal\new_relic_rpm\EventSubscriber\NewRelicRequestSubscriber::__construct()
  2. 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\EventSubscriber

Code

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->configFactory = $config_factory;
  $this->currentPathStack = $current_path_stack;
  $this->currentUser = $current_user;
}