class XHProfRequestMatcher in XHProf 8
Class WebprofilerRequestMatcher
Hierarchy
- class \Drupal\xhprof\RequestMatcher\XHProfRequestMatcher implements \Symfony\Component\HttpFoundation\RequestMatcherInterface
Expanded class hierarchy of XHProfRequestMatcher
1 string reference to 'XHProfRequestMatcher'
1 service uses XHProfRequestMatcher
File
- src/
RequestMatcher/ XHProfRequestMatcher.php, line 13
Namespace
Drupal\xhprof\RequestMatcherView source
class XHProfRequestMatcher implements RequestMatcherInterface {
/**
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
private $configFactory;
/**
* @var \Drupal\Core\Path\PathMatcherInterface
*/
private $pathMatcher;
/**
* @param ConfigFactoryInterface $configFactory
* @param \Drupal\Core\Path\PathMatcherInterface $pathMatcher
*/
public function __construct(ConfigFactoryInterface $configFactory, PathMatcherInterface $pathMatcher) {
$this->configFactory = $configFactory;
$this->pathMatcher = $pathMatcher;
}
/**
* {@inheritdoc}
*/
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);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
XHProfRequestMatcher:: |
private | property | ||
XHProfRequestMatcher:: |
private | property | ||
XHProfRequestMatcher:: |
public | function | Decides whether the rule(s) implemented by the strategy matches the supplied request. | |
XHProfRequestMatcher:: |
public | function |