function UrlMatcher::__construct

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Routing/UrlMatcher.php \Drupal\Core\Routing\UrlMatcher::__construct()
  2. 8.9.x core/lib/Drupal/Core/Routing/UrlMatcher.php \Drupal\Core\Routing\UrlMatcher::__construct()
  3. 10 core/lib/Drupal/Core/Routing/UrlMatcher.php \Drupal\Core\Routing\UrlMatcher::__construct()

Constructs a new UrlMatcher.

The parent class has a constructor we need to skip, so just override it with a no-op.

Parameters

\Drupal\Core\Path\CurrentPathStack $current_path: The current path.

1 call to UrlMatcher::__construct()
Router::__construct in core/lib/Drupal/Core/Routing/Router.php
Constructs a new Router.
1 method overrides UrlMatcher::__construct()
Router::__construct in core/lib/Drupal/Core/Routing/Router.php
Constructs a new Router.

File

core/lib/Drupal/Core/Routing/UrlMatcher.php, line 32

Class

UrlMatcher
Drupal-specific URL Matcher; handles the Drupal "system path" mapping.

Namespace

Drupal\Core\Routing

Code

public function __construct(CurrentPathStack $current_path) {
    $this->currentPath = $current_path;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.