You are here

public function XHProfRequestMatcher::matches in XHProf 8

File

src/RequestMatcher/XHProfRequestMatcher.php, line 37

Class

XHProfRequestMatcher
Class WebprofilerRequestMatcher

Namespace

Drupal\xhprof\RequestMatcher

Code

public function matches(Request $request) {
  $path = $request
    ->getPathInfo();
  $patterns = $this->configFactory
    ->get('xhprof.config')
    ->get('exclude');

  // Never collect phpinfo page.
  $patterns .= "\r\n/admin/reports/status/php";
  return !$this->pathMatcher
    ->matchPath($path, $patterns);
}