function PathMatcherInterface::matchPath

Same name in other branches
  1. 9 core/lib/Drupal/Core/Path/PathMatcherInterface.php \Drupal\Core\Path\PathMatcherInterface::matchPath()
  2. 8.9.x core/lib/Drupal/Core/Path/PathMatcherInterface.php \Drupal\Core\Path\PathMatcherInterface::matchPath()
  3. 11.x core/lib/Drupal/Core/Path/PathMatcherInterface.php \Drupal\Core\Path\PathMatcherInterface::matchPath()

Checks if a path matches any pattern in a set of patterns.

Parameters

string $path: The path to match.

string $patterns: A set of patterns separated by a newline.

Return value

bool TRUE if the path matches a pattern, FALSE otherwise.

File

core/lib/Drupal/Core/Path/PathMatcherInterface.php, line 21

Class

PathMatcherInterface
Provides an interface for URL path matchers.

Namespace

Drupal\Core\Path

Code

public function matchPath($path, $patterns);

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